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

simplify PhaseIdealLoop constructors

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 16
    • 16
    • hotspot
    • b27
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: