From 5113516a085b1fab10ab87fbcd8d727af44d0b08 Mon Sep 17 00:00:00 2001 From: Gita Koblents Date: Thu, 17 Oct 2024 15:23:27 -0400 Subject: [PATCH] Propagate known object info to aload node --- compiler/optimizer/VPHandlers.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/optimizer/VPHandlers.cpp b/compiler/optimizer/VPHandlers.cpp index 0a5fda2e046..7ff383a41d6 100644 --- a/compiler/optimizer/VPHandlers.cpp +++ b/compiler/optimizer/VPHandlers.cpp @@ -583,6 +583,14 @@ static bool findConstant(OMR::ValuePropagation *vp, TR::Node *node) } } } + else if (node->getOpCode().isLoadDirect() && + !node->hasKnownObjectIndex() && + !node->getSymbolReference()->hasKnownObjectIndex() && + node->getSymbolReference()->getSymbol()->isAutoOrParm()) + { + if (performTransformation(vp->comp(), "%sSetting known-object obj%d on node [%p]\n", OPT_DETAILS, knownObject->getIndex(), node)) + node->setKnownObjectIndex(knownObject->getIndex()); + } } } break;