C2: Make local escape analysis work with nested objects

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: None
    • Component/s: hotspot

      Given a graph:

      Point p = new Point;
      PointHolder h = new PointHolder;
      h.p = p;
      int x = p.x;
      escape(h);

      Then, we should be able to determine that even when p is stored into h.p, the memory has not escaped because h has not escaped, and p has not escaped until escape(h). This allows us to fold the load int x = p.x.

      The difficulties is that now there is a memory location that can alias p. And we need to ensure that any load from it is visited when deciding the escape status. For example:

      Point p = new Point;
      PointHolder h = new PointHolder;
      h.p = p;
      do_something;
      Point q = h.p;
      escape(q);

      Then, we need to ensure that p escapes at the call escape(q).

            Assignee:
            Quan Anh Mai
            Reporter:
            Quan Anh Mai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: