Skip to content

Commit

Permalink
Ensure new array will be zero initialized in transformArrayCloneCall
Browse files Browse the repository at this point in the history
Guarantee that new array generated from transformation of array
clone call will always be zero initialized, ensuring array allocation
is done inline, whether TR_disableSkipZeroInitInVP is enabled or not

Signed-off-by: Dylan Tuttle <[email protected]>
  • Loading branch information
dylanjtuttle committed Oct 4, 2024
1 parent 27f3631 commit 09f3256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/optimizer/ValuePropagationCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4120,7 +4120,7 @@ void OMR::ValuePropagation::transformArrayCloneCall(TR::TreeTop *callTree, OMR::
}
else
{
TR::SymbolReference *symRef = comp()->getSymRefTab()->findOrCreateNewArrayNoZeroInitSymbolRef(objNode->getSymbolReference()->getOwningMethodSymbol(comp()));
TR::SymbolReference *symRef = comp()->getSymRefTab()->findOrCreateNewArraySymbolRef(objNode->getSymbolReference()->getOwningMethodSymbol(comp()));
TR::Node::recreateWithoutProperties(callNode, TR::newarray, 2, lenNode, typeConst, symRef);
callNode->setCanSkipZeroInitialization(true);
}
Expand Down

0 comments on commit 09f3256

Please sign in to comment.