Actually, there is a bug in the implementation of InlineTypeNode::check_substitutability, when other is an InlineTypeNode, we set other_base to nullptr, but it is then passed to the recursive call to InlineTypeNode::check_substitutability.
I take this chance to improve the expansion of the call:
- Use a GraphKit, we are having a CallNode here, we can do incremental inlining and use the GraphKit to emit codes.
- Take advantage of the field value if we can figure them out even if the field type is only Object.
This is necessary when I'm trying to make the compiler less aggressive expanding all the value type fields in JDK-8370769.
Future improvement: If we cannot fully expand the check, we can emit a call to Java for each fields we cannot handle. Care must be taken so that this call will not be expanded infinitely.
I take this chance to improve the expansion of the call:
- Use a GraphKit, we are having a CallNode here, we can do incremental inlining and use the GraphKit to emit codes.
- Take advantage of the field value if we can figure them out even if the field type is only Object.
This is necessary when I'm trying to make the compiler less aggressive expanding all the value type fields in JDK-8370769.
Future improvement: If we cannot fully expand the check, we can emit a call to Java for each fields we cannot handle. Care must be taken so that this call will not be expanded infinitely.
- duplicates
-
JDK-8374024 [lworld] Follow-up cleanups from JDK-8228361
-
- Closed
-
- relates to
-
JDK-8377415 [lworld] Delay emitting null checks and type check when parsing acmp
-
- Open
-
- links to
-
Commit(lworld)
openjdk/valhalla/afe55a92
-
Review(lworld)
openjdk/valhalla/2066