Fold layout helper check for objects implementing non-array interfaces

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P2
    • 25
    • Affects Version/s: 25
    • Component/s: hotspot
    • b18

      C2 will fold the layout helper load if it can determine that the object is not an array. Currently, this does not work for an object that implements a "non-array" interface, i.e. an interface that is not 'Serializable' and not 'Cloneable':
      https://github.com/openjdk/jdk/blob/c33c1cfe7349ac657cd7bf54861227709d3c8f1b/src/hotspot/share/opto/memnode.cpp#L2215-L2223

      This is probably an oversight from JDK-8297933 that now causes issues like the one described in JDK-8348631 where data is folded but control is not.

      The fix should also undo the change to 'LibraryCallKit::generate_array_guard_common':
      https://github.com/openjdk/jdk/pull/23331

            Assignee:
            Marc Chevalier
            Reporter:
            Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: