[PATCH] powerpc: Fix build of wcscpy with --disable-multi-arch
Adhemerval Zanella
adhemerval.zanella@linaro.org
Tue Mar 5 18:33:00 GMT 2019
On 05/03/2019 15:03, Wilco Dijkstra wrote:
> Hi Adhemerval,
>
>> These kind of optimizations might made sense when the default deployment
>> was for chips which do not support fast instructions or when compiler did
>> not have a better alternative implemented. If I recall correctly I
>> implemented these when most distro used for powerpc64 was RHEL6 and its
>> compiler (gcc 4.4 if I am not mistaken) was targeting power4 and did not
>> such builtin optimization.
>
> Well that was a very long time ago, back in 2005 GCC added support for inlining
> copysign... This is why we used to have many inlines in GLIBC header files.
>
>> And I agree we with you that nowadays mostly powerpc ifunc implementation are
>> not adding anything in term of performance. Maybe a future would be indeed
>> cleanup useless ifunc variants and just use the compiler builtins.
>
> Yes, even if ifuncs made sense 15+ years ago, today there is no benefit at all.
> All internal uses of copysign are inlined using fcpsgn in eg. powerpc64le-linux-gnu
> and the power4 sequence for the power4 variants.
The question is still which baseline to use, to balance some optimization
and to avoid the multiple permutation builds. I think for powerpc
it is better to just use the builtin for all the math ifunc variants.
More information about the Libc-alpha
mailing list