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

Revisit Stadler's PEA C2 implementation

XMLWordPrintable

      Following PR tried to implement Stadler's Partial Escape Analysis in C2 Compiler

      https://github.com/openjdk/jdk/pull/14041

      Graal Compiler already implements Partial Escape Analysis in some form using Virtual Object and Virtual Object States while C2 Escape analysis misses out on several allocation elimination opportunities.

      Goal of this JBS is to explore existing C2 escape analysis, develop Java tests which clearly identify missing allocation elimination opportunities w.r.t to Graal and review the efforts of PR 14041.

      Partial escape analysis: -
      - Context sensitive allocation elimination, each new allocation has its corresponding Virtual Object and Virtual Object State to keep track of various field value modifications and state of object like locked / unlocked in different control flows . An allocation which remains in Virtual State on all control paths is non-escaping and can be eliminated.
       
      - While Valhalla gives the control of value instance creation to user, PEA/EA opportunistically eliminates allocations if an allocation is non-escaping through inter and intra procedural analysis. Thus following analogies correctly relates existing JVM components
          o Auto-vectorization - Vector API
          o EA/PEA – Valhalla

            jbhateja Jatin Bhateja
            jbhateja Jatin Bhateja
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: