diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-30 16:46:21 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-30 16:46:21 +0000 |
commit | 092c5ccf5bdcaa53151645e5628cec77fcf4062b (patch) | |
tree | 8d189635dc35b19fea16c151d3b4b61bb1ec2764 /include/llvm/Analysis/LoopInfo.h | |
parent | 0e4fa5ff365fccff46870b7d5d8d4d1d46e77986 (diff) | |
download | llvm-092c5ccf5bdcaa53151645e5628cec77fcf4062b.tar.gz llvm-092c5ccf5bdcaa53151645e5628cec77fcf4062b.tar.bz2 llvm-092c5ccf5bdcaa53151645e5628cec77fcf4062b.tar.xz |
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
Diffstat (limited to 'include/llvm/Analysis/LoopInfo.h')
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 8f44bed947..4921629a04 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -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); } |