Page MenuHomePhabricator

An unreachable block may have a route to a reachable block, don't fast-path return that it can't.
ClosedPublic

Authored by nicholas on Apr 2 2019, 7:41 PM.

Details

Reviewers
asbirlea
Summary

A block reachable from the entry block can't have any route to a block that's not reachable from the entry block (if it did, that route would make it reachable from the entry block). That is the intended performance optimization for isPotentiallyReachable. For the case where we ask whether an unreachable from entry block has a route to a reachable from entry block, we can't conclude one way or the other. Fix a bug where we claimed there could be no such route.

The fix in rL357425 ironically reintroduced the very bug it was fixing but only when a DominatorTree is provided. This fixes the remaining bug.

Diff Detail

Event Timeline

nicholas created this revision.Apr 2 2019, 7:41 PM
nicholas edited the summary of this revision. (Show Details)Apr 3 2019, 12:16 PM
nicholas edited the summary of this revision. (Show Details)Apr 4 2019, 12:53 PM
asbirlea accepted this revision.Apr 4 2019, 3:30 PM

lgtm.

This revision is now accepted and ready to land.Apr 4 2019, 3:30 PM