Implement a heuristic for ciInlineKlass::is_scalarizable() and use it to determine if we should attempt scalarization (calling convention and inside a method body).
Currently, if is_scalarizable is false, the implementation is very conservative and does not attempt any optimizations (for example, avoid allocations at withfield or fold loads from buffers). As a result, a large amount of (allocation) nodes is generated and we might even bail out from compilation.
We also need a reasonable limit for the calling convention here:
http://hg.openjdk.java.net/valhalla/valhalla/file/cf9a8e7a0094/src/hotspot/share/runtime/sharedRuntime.cpp#l2873
Otherwise adapters and entry points might become too large to fit into the corresponding code buffers.
Currently, if is_scalarizable is false, the implementation is very conservative and does not attempt any optimizations (for example, avoid allocations at withfield or fold loads from buffers). As a result, a large amount of (allocation) nodes is generated and we might even bail out from compilation.
We also need a reasonable limit for the calling convention here:
http://hg.openjdk.java.net/valhalla/valhalla/file/cf9a8e7a0094/src/hotspot/share/runtime/sharedRuntime.cpp#l2873
Otherwise adapters and entry points might become too large to fit into the corresponding code buffers.
- relates to
-
JDK-8259556 [lworld] Various C2 crashes with -XX:-ScalarizeInlineTypes
-
- Resolved
-