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

rework long counted loop handling

XMLWordPrintable

    • b27

      Currently the transformation of a long counted loop to a loop nest with an inner int counted loop is performed in 2 steps:

      1- recognize the counted loop shape and build the loop nest
      2- transform the inner loop into a counted loop

      I propose changing this to a 3 steps process:

      1- recognize the counted loop shape (transform the loop into a LongCountedLoop)
      2- build the loop nest
      3- transform the inner loop into a counted loop

      The benefits are:

      - the logic is cleaner because step 1 and 2 are now separated
      - simple optimizations (loop iv type, empty loop elimination, parallel iv) can be implemented for LongCountedLoop by refactoring existing code

            roland Roland Westrelin
            roland Roland Westrelin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: