Skip to content

Commit

Permalink
Reset _defMergedNodes in VP on every basic block
Browse files Browse the repository at this point in the history
  • Loading branch information
gita-omr committed Aug 9, 2021
1 parent aef6376 commit a14b5d6
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions compiler/optimizer/OMRValuePropagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4091,14 +4091,15 @@ void TR::GlobalValuePropagation::processStructure(TR_StructureSubGraphNode *node
}
else
{
// Only commoned nodes within an extended block need to be set
// in _defMergedNodes. So it's safe to reset it here
_defMergedNodes->empty();
processImproperLoop(node, lastTimeThrough, insideLoop);
}
}
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 Expand Up @@ -4469,10 +4470,6 @@ void TR::GlobalValuePropagation::processRegionSubgraph(TR_StructureSubGraphNode
// Current constraints have already been set up to be the input constraints.
//

// Only commoned nodes within an extended block need to be set
// in _defMergedNodes. So it's safe to reset it here
_defMergedNodes->empty();

TR_RegionStructure *region = node->getStructure()->asRegion();
TR_StructureSubGraphNode *entry = region->getEntry();

Expand Down

0 comments on commit a14b5d6

Please sign in to comment.