[9] RFR(S): 8168770: Fix for 8151988 causes performance regression on SPARC

Tobias Hartmann tobias.hartmann at oracle.com
Wed Oct 26 09:19:20 UTC 2016


Hi,

please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8168770
http://cr.openjdk.java.net/~thartmann/8168770/webrev.00/

The fix for 8151988 [1] moved the ModNode control input optimization from Ideal to the final graph reshaping phase to enable finding similar DivNodes for the DivMod optimization. The original problem was that if the control input edge of the ModNode is replaced by NULL, Node::find_similar() does not find a similar DivNode for the DivMod optimization (because the DivNodes still have their control input set). Doing the control edge cut off only after the optimization fixed this. 

However, it turned out that the fix causes a significant performance regression for some benchmarks on SPARC because SPARC does not implement the DivModNode. Leaving the control edge also reduces the possibilities for reordering during loop optimizations. I think we should try to cut off the control input edge as soon as possible (as we did before). I reverted the fix for JDK-8151988 and added the control input optimization to the DivNodes as well (we only did this for constant divisors).

I verified that this fixes 8151988 and also the performance regression on SPARC is gone (see comments in the bug).

Tested with test case for 8151988, RBT and performance testing (running).

Best regards,
Tobias

[1] http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/60e84c7db2f7


More information about the hotspot-compiler-dev mailing list