diff --git a/runtime/compiler/optimizer/EscapeAnalysis.cpp b/runtime/compiler/optimizer/EscapeAnalysis.cpp index 8500b4ad1e4..26287d751ea 100644 --- a/runtime/compiler/optimizer/EscapeAnalysis.cpp +++ b/runtime/compiler/optimizer/EscapeAnalysis.cpp @@ -9153,7 +9153,7 @@ int32_t TR_LocalFlushElimination::perform() _allocationInfo->empty(); } - examineNode(node, treeTop, visited); + examineNode(node, treeTop, block, visited); } FlushCandidate *flushCandidate; @@ -9174,7 +9174,7 @@ int32_t TR_LocalFlushElimination::perform() } -bool TR_LocalFlushElimination::examineNode(TR::Node *node, TR::TreeTop *tt, TR::NodeChecklist& visited) +bool TR_LocalFlushElimination::examineNode(TR::Node *node, TR::TreeTop *tt, TR::Block *currBlock, TR::NodeChecklist& visited) { if (visited.contains(node)) return true; @@ -9356,7 +9356,7 @@ bool TR_LocalFlushElimination::examineNode(TR::Node *node, TR::TreeTop *tt, TR:: { if (reachingFlushCandidate->isOptimallyPlaced() || reachingFlushCandidate->getFlush()->getNode()->getAllocation() == NULL || - reachingFlushCandidate->getBlockNum() != tt->getEnclosingBlock()->getNumber()) + reachingFlushCandidate->getBlockNum() != currBlock->getNumber()) continue; reachingCandidate = getCandidate(_candidates, reachingFlushCandidate); if (!reachingCandidate) @@ -9531,7 +9531,7 @@ bool TR_LocalFlushElimination::examineNode(TR::Node *node, TR::TreeTop *tt, TR:: { TR::Node *child = node->getChild(i); - if (!examineNode(child, tt, visited)) + if (!examineNode(child, tt, currBlock, visited)) return false; } diff --git a/runtime/compiler/optimizer/EscapeAnalysis.hpp b/runtime/compiler/optimizer/EscapeAnalysis.hpp index d454e986b55..a7475cc4df7 100644 --- a/runtime/compiler/optimizer/EscapeAnalysis.hpp +++ b/runtime/compiler/optimizer/EscapeAnalysis.hpp @@ -803,7 +803,7 @@ class TR_LocalFlushElimination TR_LocalFlushElimination(TR_EscapeAnalysis *, int32_t numAllocations); virtual int32_t perform(); - bool examineNode(TR::Node *, TR::TreeTop *, TR::NodeChecklist& visited); + bool examineNode(TR::Node *, TR::TreeTop *, TR::Block *, TR::NodeChecklist& visited); TR::Optimizer * optimizer() { return _escapeAnalysis->optimizer(); } TR::Compilation * comp() { return _escapeAnalysis->comp(); }