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

[lworld] C2 does not scalarize inline types wrapped into non-escaping box objects

XMLWordPrintable

      C2 fails to scalarize inline types wrapped into non-inline, non-escaping (box) objects.

      For example, in TestLWorld::test109, C2 successfully scalar replaces the InterfaceBox object but not the LongWrapper object it contains because of the complex control flow in LongWrapper::wrap. However, since LongWrapper is an inline type, we don't need to rely on Escape Analysis to be able to scalar replace. Now the problem is that LongWrapper is stored as oop in a field of type WrapperInterface and we don't keep track of the ValueType(Ptr)Node long enough (i.e. until after EA) for the load to be removed and the buffer allocation to go away.

            thartmann Tobias Hartmann
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: