This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix build failure on power4
On Wed, Jan 02, 2013 at 01:32:46PM -0600, Steven Munroe wrote:
> Yes the whole set of patches needs to be review by the PowerPC
> maintainer (and myself as the originator of the PPC specific mpa.c
> changes).
>
> This whole series make some rash assumptions about the relative
> performance of FXU/FPU pipelines and the associate latencies for
> transfers between them. Also the trade-offs become less obvious on
> out-of-order, weakly-consistent-memory machines like PowerPC and all
> POWER servers since POWER4 (POWER6 was in-order but still weakly
> consistent).
You clearly haven't seen the patches I have commited so far. The only
patch you can say this about is the one that splits the multiplication
loop. The rest are either:
1) Branch prediction fixes to make sure that the right code gets
pipelined
OR
2) Replacing global constants with actual values where the former is
unnecessary and simply causes an extra indirection
I don't see any of them having anything to do with pipelines.
The point of the entire set of patches is to get rid of FP operations
altogether in cases that don't need them. Most of the mp
implementation barring conversion to/from double and the inverse
operation don't need fp and can do well with just integer operations.
> Also this implementation totally ignores the possibility for
> super-scalar pipeline parallelism. This was the original rational for
> the power4 specialization. This applicable to both Fixed (FXU) and
> floating Point (FPU) computation.
>
> Finally someone should look at this implementation for vectorization
> opportunities and possible coding style changes to allow for
> auto-vector.
The current libm implementation ignores a lot of very basic things
that at least allow the compiler to make better choices. I'm first
trying to fix that. I have a few more patches that I haven't posted
yet since they rely on the assertion that the mantissa elements in
mp_no are always integers. I'd love it if someone could point out
real flaws in that assertion since that pretty much is the main point
for elimination of FP operations.
Finally, to the point of this current patch - it only defines globals
mpone and mptwo and replaces some other globals with their actual
values since the globals are unnecessary there. Do you think that is
wrong?
Siddhesh