This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC - ilogb[f|l] optimization for POWER7
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Cc: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, Peter Bergner <bergner at vnet dot ibm dot com>
- Date: Thu, 10 May 2012 16:46:59 -0300
- Subject: Re: [PATCH] PowerPC - ilogb[f|l] optimization for POWER7
- References: <4FA91281.8090109@linux.vnet.ibm.com> <4FABE50D.8080909@twiddle.net>
On 05/10/2012 12:55 PM, Richard Henderson wrote:
> Is this really so much better than what the compiler can generate?
> If the dispatch group split is that critical, you ought to fix it
> in the scheduler -- it's not like these are the only two double->int
> conversions in the entire library.
>
> The documentation for this macro is sorely lacking too. At first I
> thought you meant EXTRACT_WORDS64 but hadn't known what the macro
> was supposed to be called.
Currently, yes it is. For POWER7, on FP<->INT transformations using unions or casts
the compiler will not reschedule neither, in case the reschedule is not possible,
it will generate dispatch groups split by inserting an 'ori 2,0,0' between the
load and/or store instructions. And libm uses it extensively.
I already point out some improvements I got by reimplementing somes FP<->INT macros
in "sysdeps/generic/math_private.h" by manually inserting the dispatch group split,
but I'm not sure why compiler guys didn't take a look at it yet.
--
Adhemerval Zanella Netto
Software Engineer
Linux Technology Center Brazil
Toolchain / GLIBC on Power Architecture
azanella@linux.vnet.ibm.com / azanella@br.ibm.com
+55 61 8642-9890