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 03/28] powerpc: Remove power4 mpa optimization


On Fri, Mar 29 2019, Adhemerval Zanella wrote:
> This patch removes the POWER4 optimized mpa optimization used for power4+
> build.  For newer chips, GCC generates *worse* code than generic
> implementation as benchmaks result below.

I don't think I have access to POWER4 hardware, but when running
power4-targeted builds on newer processors, I saw no performance
degradation even in that scenario.

> One possibilty would to add
> IFUNC variants for the mpa routines (as x86_64), but it will add complexity
> only for older chips (and one would need to check if power5, power5+, and
> power6 do benefict from this optimization), and only for specific
> implementation (since most used ones such as sin, cos, exp, pow already
> avoid calling the slow multiprecision path).

I don't think it's worth the effort.

> Checked on powerpc-linux-gnu (built without --with-cpu, with
> --with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch),
> powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+
> and --disable-multi-arch).

Thanks for the thorough checking.

> 	* sysdeps/powerpc/power4/fpu/Makefile: Remove file.
> 	* sysdeps/powerpc/power4/fpu/mpa-arch.h: Likewise.
> 	* sysdeps/powerpc/power4/fpu/mpa.c: Likewise.

Looks good to me.

Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>


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