Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.36.0] Avoid calling getEnclosingBlock #16465

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions runtime/compiler/optimizer/EscapeAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9153,7 +9153,7 @@ int32_t TR_LocalFlushElimination::perform()
_allocationInfo->empty();
}

examineNode(node, treeTop, visited);
examineNode(node, treeTop, block, visited);
}

FlushCandidate *flushCandidate;
Expand All @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/optimizer/EscapeAnalysis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down