Skip to content

Commit

Permalink
Update comments to show use of new class flag
Browse files Browse the repository at this point in the history
The IL that is generated in lowering calls to
<storeFlattenableArrayElementNonHelper> and calls to
<loadFlattenableArrayElementNonHelper> now includes a test of the
J9ClassArrayIsNullRestricted class flag of the array rather than the
J9ClassIsPrimitiveValueType class flag of the array's component type.
This change updates the example IL in the comments for the methods that
perform that flattening to reflect that.

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
  • Loading branch information
hzongaro committed Oct 3, 2024
1 parent 63bb7b2 commit 686080c
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions runtime/compiler/optimizer/TreeLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,9 @@ static bool skipBoundChecks(TR::Compilation *comp, TR::Node *node)
*
Before:
+----------------------------------------+
|NULLCHK |
| PassThrough |
| ==>iRegLoad (array address) |
|treetop |
| acall jitLoadFlattenableArrayElement |
| ==>iRegLoad |
Expand All @@ -895,15 +898,16 @@ static bool skipBoundChecks(TR::Compilation *comp, TR::Node *node)
After:
+------------------------------------------+
|BBStart |
|treetop |
| ==>iRegLoad |
|NULLCHK |
| PassThrough |
| ==>iRegLoad (array address) |
|treetop |
| ==>aRegLoad |
|ificmpne ----->---------------------------+-----------+
| iand | |
| iloadi <isClassFlags> | |
| ... | |
| iconst J9ClassIsPrimitiveValueType | |
| iconst J9ClassArrayIsNullRestricted | |
| iconst 0 | |
| GlRegDeps () | |
| ==>aRegLoad | |
Expand Down Expand Up @@ -1215,6 +1219,9 @@ static bool skipArrayStoreChecks(TR::Compilation *comp, TR::Node *node)
*
Before:
+-------------------------------------------+
|NULLCHK |
| PassThrough |
| aload <ArrayAddress> |
|treetop |
| acall jitStoreFlattenableArrayElement |
| aload <value> |
Expand All @@ -1226,8 +1233,9 @@ static bool skipArrayStoreChecks(TR::Compilation *comp, TR::Node *node)
After:
+-------------------------------------------+
|BBStart |
|treetop |
| aload <ArrayAddress> |
|NULLCHK |
| PassThrough |
| aload <ArrayAddress> |
|treetop |
| aload <index> |
|treetop |
Expand All @@ -1236,7 +1244,7 @@ static bool skipArrayStoreChecks(TR::Compilation *comp, TR::Node *node)
| iand | |
| iloadi <isClassFlags> | |
| ... | |
| iconst J9ClassIsPrimitiveValueType | |
| iconst J9ClassArrayIsNullRestricted | |
| iconst 0 | |
| GlRegDeps () | |
| PassThrough rcx | |
Expand All @@ -1249,8 +1257,6 @@ static bool skipArrayStoreChecks(TR::Compilation *comp, TR::Node *node)
+-------------------------------------------+ |
+-------------------------------------------+ |
|BBStart (extension of previous block) | |
|NULLCHK on n82n [if required] | |
| ... | |
|BNDCHK | |
| ... | |
|treetop | |
Expand Down

0 comments on commit 686080c

Please sign in to comment.