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

C2: let pure call float/weaken or remove control pinning

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 26
    • hotspot

      JDK-8347901 allows C2 to remove pure calls when the result is unused. Yet, pure calls are still control-pinned, which limits the optimization potential. It's for instance not yet possible to hoist a loop-invariant pure call above the loop, or push a pure call into a if-branch when the else-branch doesn't use the result.

      The control input and output of pure calls are useful to lower them into regular leaf call. Multiple ways are possible:
      - keep the control-pinning but move the calls manually
      - not pin pure calls until we can find where the value is needed (during loop opts), and pin them somewhere (outside of as many loops as possible, then as late as possible?)
      - not have control at all, let GCM do the job, and not lower into leaf call, but then something else needs to be done to generate code at the end.
      - ???

            Unassigned Unassigned
            mchevalier Marc Chevalier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: