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

Missing optimization opportunities due to missing try_clean_mem_phi() calls

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 22
    • 17, 21, 22
    • hotspot
    • b14

    Description

      While working on JDK-8293541 in Valhalla, I've noticed that we are missing try_clean_mem_phi() calls which prevents further optimizations due to not removing a diamond if-region.

      The problem is that such a memory phi, which could be optimized by try_clean_mem_phi(), is currently only simplified if the region has exactly one phi. However, in certain IGVN worklist orders we get the following:
      1) region is processed which multiple phis
      2) the second last phi is removed from the region, only leaving the memory phi to be optimized
      3) the memory phi does not make it to the worklist again

      A solution could be to either readd the region to the IGVN list or to always transform a memory phi with try_clean_mem_phi() if a region forms a proper diamond.

      Attachments

        Issue Links

          Activity

            People

              chagedorn Christian Hagedorn
              chagedorn Christian Hagedorn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: