This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fixes tree-loop-distribute-patterns issues
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, "GNU C. Library" <libc-alpha at sourceware dot org>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Wed, 19 Jun 2013 16:26:12 -0400
- Subject: Re: [PATCH] Fixes tree-loop-distribute-patterns issues
- References: <51C0AFB7 dot 1060009 at linux dot vnet dot ibm dot com> <20130618205608 dot 9CCE22C0AC at topped-with-meat dot com> <51C1BFE9 dot 4070805 at linux dot vnet dot ibm dot com> <51C1CEFC dot 9000100 at redhat dot com> <51C1FE4C dot 3020400 at linux dot vnet dot ibm dot com>
Adhemerval,
>> I think this is a good approach, but we will have to see how it plays out
>> and if it is robust enough.
>
> We might make it more robust (maybe trying different loops), do you think it
> is worth to push more tests?
No, not for now. I think what you have is the right solution.
It catches implicit and explicit uses of the option to optimize
loops into function calls.
> 2013-06-19 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
>
> * config.h.in (HAVE_CC_PREDEF_DISTRIBUTE_PATTERNS): New define.
Wrong name.
> * configure.in (libc_cv_predef_loop_distribute_patttern): Check if
Likewise.
> compiler plus optimization may generate memset/memmove library calls
> for some loop constructions.
> * include/libc-symbols.h (libc_disable_loop_to_calls): Define to
Likewise.
> disable loop transformation to library calls.
> * string/memmove.c (MEMMOVE): Disable loop transformation to avoid
> recursive call.
> * string/memset.c (memset): Likewise.
> * string/test-memmove.c (simple_memmove): Disable loop transformation
> to library calls.
> * string/test-memset.c (simple_memset): Likewise.
> * benchtests/bench-memmove.c (simple_memmove): Likewise.
OK with names in ChangeLog fixed and cut-and-paste fixed.
> --
>
> diff --git a/benchtests/bench-memmove.c b/benchtests/bench-memmove.c
> index dccde5d..bfe085b 100644
...
> char *r = s, *end = s + n;
Cut-and-paste error?
> * benchtests/bench-memset.c (simple_memset): Likewise.
> * configure: Regenerated.
>
Thanks for working this out!
Please check this in on Friday if nobody else objects.
Cheers,
Carlos.