Request for review (L): 6378821: where available, bitCount() should use POPC on SPARC processors and AMD+10h
Tom Rodriguez
Thomas.Rodriguez at Sun.COM
Thu Mar 12 16:16:19 PDT 2009
The PopCount nodes should only take one argument since they are never
required to have control.
I think there are problems with register usage with PopCountL in
x86_32.ad. USEs (inputs) and TEMPs are guaranteed to be different
registers but DEFs are not. KILLs and DEFs are guaranteed to be
different. The model of register interference is like a single
hardware instruction where all the effects occur simultaneously so the
DEFs and USEs can't interfere. So for this:
+instruct popCountL(eRegI dst, eRegL src, eRegI tmp, eFlagsReg cr) %{
+ match(Set dst (PopCountL src));
+ effect(KILL cr, TEMP tmp);
dst isn't required to be different than src or tmp which will break
you code generation. If you add TEMP dst to the effects then the
register allocator will make the output interfere with the inputs so
you can use it as a temp in the code generation. The memory one has
the same problem.
Otherwise this looks good.
tom
On Mar 12, 2009, at 10:21 AM, Christian Thalinger wrote:
> http://cr.openjdk.java.net/~twisti/6378821/webrev.00/
>
More information about the hotspot-compiler-dev
mailing list