This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fixes tree-loop-distribute-patterns issues


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]