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: GCC 4.8 and -ftree-loop-distribute-patterns.


On Monday, April 08, 2013 11:03:23 Adhemerval Zanella wrote:
> 2013-04-08  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
> 
>         * config.h.in: Add HAVE_CC_PREDEF_DISTRIBUTE_PATTERNS define.
>         * configure.in (libc_cv_predef_loop_distribute_patttern):
> Check if compiler with defined optimization may generate
> memset/memmove library calls for some loop constructions.
>         * configure: Regenerate.
>         * stdlib/divrem.c: Include <string.h> if
>         HAVE_CC_PREDEF_DISTRIBUTE_PATTERNS is defined.
>         * stdlib/mul.c: Likewise.
>         * stdlib/mul_n.c: Likewise.
>         * wcsmbs/wcpncpy.c: Likewise.
>         * wcsmbs/wcsncpy.c: Likewise.

Sorry for jumping in late. I thought we had two issues:

1) Compiling without -ftree-loop-distribute patterns on files so that 
memcpy does not get replaced with a compiler call to it - Roland 
suggested to use __attribute__ ((optimize ("no-tree-loop-distribute-
patterns"))) in this case and using a configure check. It seems that this 
is not needed at all.

2) The issue were just the redefinition helps so that a call to internal 
functions is issued.
For this case I do not see the need for a configure check, IMO it would 
be enough to add the include together with a comment on why it's 
included so that the include does not get accidentially removed. This is 
far less maintenance burden than adding a configure test.

Adhemerval, thanks for the patch - but I do not agree with Carlos that 
this is the best solution,

Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


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