Skip to content

Commit

Permalink
Merge pull request #20176 from rmnattas/off-heap-helper
Browse files Browse the repository at this point in the history
Insert loading dataAddr in calculateElementAddress for OffHeap
  • Loading branch information
zl-wang authored Sep 17, 2024
2 parents 099fe61 + 346ee44 commit 8393fab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtime/compiler/optimizer/J9TransformUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2126,6 +2126,12 @@ TR::Node * J9::TransformUtil::calculateElementAddress(TR::Compilation *comp, TR:
offset->setIsNonNegative(true);
// Calculate element address
TR::Node *addrCalc = NULL;

#if defined(J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION)
if (TR::Compiler->om.isOffHeapAllocationEnabled())
array = TR::TransformUtil::generateDataAddrLoadTrees(comp, array);
#endif /* J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION */

if (comp->target().is64Bit())
addrCalc = TR::Node::create(TR::aladd, 2, array, offset);
else
Expand Down

0 comments on commit 8393fab

Please sign in to comment.