Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8144487

PhaseIdealLoop::build_and_optimize() must restore major_progress flag if skip_loop_opts is true

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8, 9
    • hotspot
    • b103

        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 @@
             }
           }

              thartmann Tobias Hartmann
              thartmann Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: