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

simplify PhaseIdealLoop constructors

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b27
    • CPU:
      generic
    • OS:
      generic

      Description

      Currently, C2 has 3 private constructors of PhaseIdealLoop as follows. a-b are for verification, only c is for real loop optimizations.
      a.
      // Perform verification that the graph is valid.
      PhaseIdealLoop( PhaseIterGVN &igvn)
      b.
      // Verify that verify_me made the same decisions as a fresh run.
      PhaseIdealLoop(PhaseIterGVN &igvn, const PhaseIdealLoop *verify_me)
      c.
      PhaseIdealLoop(PhaseIterGVN &igvn, LoopOptsMode mode)

      I propose 3 changes to simplify them.

      1. add assertion in the constructor c. C2 shouldn't use mode = LoopOptsVerify for it.
      2. merge a and b into one constructor.
      3. make the merged verification ctor only for debug builds.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              xliu Xin Liu
              Reporter:
              xliu Xin Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: