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] powerpc: Fix build of wcscpy with --disable-multi-arch


Hi,

>  sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c

> But I am not sure it is really pays off in term of simplify glibc code
> and build. Maybe an option is just to use __builtin_* when we know
> compiler generates an efficient instruction and just use the generic
> implementation instead.

Indeed. Simple builtin functions like these are inlined by compilers,
and that's always faster than calling a GLIBC version which might
use an ifunc.

That means you will practically never see calls to copysign, so it
does not make sense to optimize it using ifuncs. A large proportion of
ifuncs do nothing for performance, they only increase complexity and
make improving generic code more difficult and error prone. 

If we focus more effort on optimizing generic code, we actually need
even fewer target specific optimizations (as the generic string and math
optimizations have proven).

Cheers,
Wilco

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