RFR(M): 8027754: Enable loop optimizations for loops with MathExact inside
Rickard Bäckman
rickard.backman at oracle.com
Thu Jan 23 03:27:23 PST 2014
Hi all,
this change is going to 9 (and backporting to 8u20). Can I please have
this change reviewed?
The implementation of different j.l.Math.mathExact() didn't work very
well with different optimizations because there was one node that
generated both control and data. This change has a new implementation
where each call to j.l.Math.mathExact() generates a Overflow node and a
normal math operation node (in the integer add example: OverflowAddINode
and a AddINode). The Overflow node is responsible for generating
control.
In the end we generate assembly like:
mov rdx, rdi
add rdx, rsi
...
mov rax, rdi
add rax, rsi
jo <overflow label>
With one add instruction for the data and one for flags. Future
improvements could be to try to match the Overflow and the math
operation and remove one of them.
Bug: https://bugs.openjdk.java.net/browse/JDK-8027754
Webrev: http://cr.openjdk.java.net/~rbackman/8027754/
Thanks
/R
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140123/3d24f123/attachment.bin
More information about the hotspot-compiler-dev
mailing list