Handle unreachable code in the dominates functions. This changes users when

needed for correctness, but still doesn't clean up code that now unnecessary
checks for reachability.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153755 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2012-03-30 16:46:21 +00:00
parent 0e4fa5ff36
commit 092c5ccf5b
6 changed files with 239 additions and 11 deletions

View File

@@ -762,7 +762,8 @@ public:
InvBlockTraits::child_begin(BB), E = InvBlockTraits::child_end(BB);
I != E; ++I) {
typename InvBlockTraits::NodeType *N = *I;
if (DT.dominates(BB, N)) // If BB dominates its predecessor...
// If BB dominates its predecessor...
if (DT.dominates(BB, N) && DT.isReachableFromEntry(N))
TodoStack.push_back(N);
}