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 05/18] Open-code the memcpy() at static TLS initialization time.


On 10 Mar 2016, Adhemerval Zanella stated:

> On 10-03-2016 09:28, Mike Frysinger wrote:
>> otherwise, you'd want to use "#ifdef".
>> -mike
>
> Is _HAVE_STRING_ARCH_memcpy really doing a better job than gcc? I would prefer
> to just use the open memcpy and let it optimize it.

In most cases I'd agree with you but the thing about
_HAVE_STRING_ARCH_memcpy is that GCC can decide *not* to optimize it:
though we have suppressed generation of libcalls in this function, not
even a call to __builtin_memcpy() is guaranteed to generate inline asm
with no function calls, as far as I know.

(We could start messing about with
__attribute__((__optimize__("-mmemcpy-strategy=STRATEGY"))), but this is
really starting to get a bit over the top, I think... particularly given
that the only platform that works on is *also* the only platform we have
ARCH_memcpy for, so the only platform we don't need that sort of thing
on.)

-- 
NULL && (void)


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