JDK-8144487 : PhaseIdealLoop::build_and_optimize() must restore major_progress flag if skip_loop_opts is true
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-12-02
  • Updated: 2016-04-27
  • Resolved: 2015-12-21
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.
JDK 8 JDK 9
8u101Fixed 9 b103Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
The fix for JDK-7107042 introduced a 'skip_loop_opts' flag for PhaseIdealLoop::build_and_optimize() to not execute loop optimizations before EA. We need to restore the major_progress flag before calling igvn.optimize() because other code depends on the fact that we don't execute more loop optimizations if major_progress() is not set:

--- a/src/share/vm/opto/loopnode.cpp	Mon Oct 05 23:53:59 2015 +0200
+++ b/src/share/vm/opto/loopnode.cpp	Wed Dec 02 14:04:06 2015 +0100
@@ -2310,6 +2310,11 @@
 #endif
 
   if (skip_loop_opts) {
+    // restore major progress flag
+    for (int i = 0; i < old_progress; i++) {
+      C->set_major_progress();
+    }
+
     // Cleanup any modified bits
     _igvn.optimize();
 
@@ -2421,6 +2426,13 @@
     }
   }
Comments
ILW = may disable/degrade optimizations, medium, no workaround = MMH = P3
18-12-2015