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

C2: remove unreachable block after NeverBranch-to-Goto conversion

XMLWordPrintable

    • b11

        NeverBranch nodes introduce fake branches out of infinite loops to simplify intermediate optimizations that assume full reachability (see before.pdf). 'PhaseCFG::convert_NeverBranch_to_Goto()' transforms such nodes into simple Goto nodes, removing the fake branch and thus making its destination block unreachable (see after.pdf).

        This RFE proposes removing the unreachable destination block created by 'PhaseCFG::convert_NeverBranch_to_Goto()' from the list of basic blocks (see after-removal.pdf). Removing the unreachable block simplifies late control-flow analysis (for example, recomputing dominators during the output phase as required for late barrier analysis in Generational ZGC) and slightly reduces the size of the resulting nmethod.

          1. before.pdf
            7 kB
          2. after.pdf
            6 kB
          3. after-removal.pdf
            5 kB

              rcastanedalo Roberto Castaneda Lozano
              rcastanedalo Roberto Castaneda Lozano
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: