Skip to content

Commit

Permalink
Ignore unreachable paths in TR::GlobalValuePropagation::mergeDefinedO…
Browse files Browse the repository at this point in the history
…nAllPaths

When we are merging "defined on all" paths information from block
predecessors, we need to ignore the ones that have been proven
unreachable and therefore don't have that information calculated.
Since it's an intersection of the info from all predecessors,
resulting info becomes too conservative and does not allow propagation
that could've happened otherwise.
  • Loading branch information
gita-omr committed Jun 8, 2021
1 parent 01dcdd8 commit df01f62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/optimizer/OMRValuePropagation.cpp
Expand Up @@ -4579,6 +4579,10 @@ TR_BitVector *TR::GlobalValuePropagation::mergeDefinedOnAllPaths(TR_StructureSub
bool first = true;
for (auto itr = node->getPredecessors().begin(), end = node->getPredecessors().end(); itr != end; ++itr)
{
EdgeConstraints *constraints = getEdgeConstraints(*itr);
if (isUnreachablePath(constraints))
continue;

TR_BitVector *predDefinedOnAllPaths = (*_definedOnAllPaths)[*itr];
if (trace())
{
Expand Down

0 comments on commit df01f62

Please sign in to comment.