Skip to content

Commit

Permalink
Merge pull request #6121 from gita-omr/pr_vijays_vp_fix
Browse files Browse the repository at this point in the history
Reset _defMergedNodes in global VP on every basic block
  • Loading branch information
vijaysun-omr authored Aug 26, 2021
2 parents 55099d6 + f79041a commit e4c209a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/optimizer/OMRValuePropagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4081,7 +4081,6 @@ void TR::GlobalValuePropagation::processStructure(TR_StructureSubGraphNode *node
TR_RegionStructure *region = node->getStructure()->asRegion();
if (region)
{
_defMergedNodes->empty();
if (region->isAcyclic())
{
processAcyclicRegion(node, lastTimeThrough, insideLoop);
Expand All @@ -4097,6 +4096,10 @@ void TR::GlobalValuePropagation::processStructure(TR_StructureSubGraphNode *node
}
else
{
// Only commoned nodes within a block need to be set in _defMergedNodes.
// So it should be reset here
TR_ASSERT_FATAL(!node->getStructure()->asBlock()->getBlock()->isExtensionOfPreviousBlock(), "This optimization does not run on extended blocks");
_defMergedNodes->empty();
processBlock(node, lastTimeThrough, insideLoop);
}
}
Expand Down

0 comments on commit e4c209a

Please sign in to comment.