JDK-8236722 : Extend loop unswitching to handle loop predicates with a control dependency to partially peeled statements
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12,13,14,15,16
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2020-01-07
  • Updated: 2020-10-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
An initial attempt was made in JDK-8233033. However, the fix assumed wrongly that partially peeled statements always have a dependency inside the loop to be unswitched (i.e. when following their outputs eventually a phi node is hit belonging to either the slow or the fast loop). This is not always the case (JDK-8235984).

The fix for JDK-8233033 was replaced in JDK-8235984 by a simple bailout for JDK-14. A proper fix could be targeted for JDK-15.
Comments
http://cr.openjdk.java.net/~chagedorn/8236722/webrev.01/ Testing looked good but there are some reoccurring small regressions (2-5%) on some micros-crypto benchmarks preventing this patch to be sent out for review. The following tests were converted to JMH benchmarks (testing throughput) and the results look promising. However, we also see in testA7 a decrease of -5% which cannot be explained, yet. The observed small regressions in the micros-crypto could also be related to this decrease. A next step could be to analyse the generated code of testA7 compared to the base line. Benchmark Improvement org.sample.PartialPeelingUnswitch.test: +2.26% org.sample.PartialPeelingUnswitch.test10: +1.05% org.sample.PartialPeelingUnswitch.test11Xcomp: -0.27% org.sample.PartialPeelingUnswitch.test12Xcomp: -0.24% org.sample.PartialPeelingUnswitch.test13Xcomp: +2.58% org.sample.PartialPeelingUnswitch.test14Peel: +1.01% org.sample.PartialPeelingUnswitch.test15earlyCtrl: +21.09% org.sample.PartialPeelingUnswitch.test16: +10.10% org.sample.PartialPeelingUnswitch.test17Xcomp: -0.27% org.sample.PartialPeelingUnswitch.test18Xcomp: +0.13% org.sample.PartialPeelingUnswitch.test19Xcomp: +0.43% org.sample.PartialPeelingUnswitch.test2: +3.53% org.sample.PartialPeelingUnswitch.test20: +0.62% org.sample.PartialPeelingUnswitch.test21: -0.44% org.sample.PartialPeelingUnswitch.test22TwoSwitchs: -0.92% org.sample.PartialPeelingUnswitch.test23: +4.03% org.sample.PartialPeelingUnswitch.test24: +16.56% org.sample.PartialPeelingUnswitch.test3: +21.36% org.sample.PartialPeelingUnswitch.test4: +20.31% org.sample.PartialPeelingUnswitch.test5: -0.67% org.sample.PartialPeelingUnswitch.test6: -0.13% org.sample.PartialPeelingUnswitch.test7: +0.44% org.sample.PartialPeelingUnswitch.test8: +1.39% org.sample.PartialPeelingUnswitch.test9: +0.77% org.sample.PartialPeelingUnswitch.testA1: +19.43% org.sample.PartialPeelingUnswitch.testA10: +5.46% org.sample.PartialPeelingUnswitch.testA2: +3.68% org.sample.PartialPeelingUnswitch.testA3: +3.75% org.sample.PartialPeelingUnswitch.testA4: +31.96% org.sample.PartialPeelingUnswitch.testA5: +20.18% org.sample.PartialPeelingUnswitch.testA6: -1.74% org.sample.PartialPeelingUnswitch.testA7: -5.42% org.sample.PartialPeelingUnswitch.testA8: +20.89% org.sample.PartialPeelingUnswitch.testA9: +17.89%
06-04-2020