summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2010-08-10 09:54:35 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2010-08-10 09:54:35 +0000
commit73362c820bad20e545d37b8a2414c35c0d3d583c (patch)
tree463d403b034add16033613b5375133841016b938 /lib
parent0e28b1507fdf889fdfe0159a042ec8c74f6c2245 (diff)
downloadllvm-73362c820bad20e545d37b8a2414c35c0d3d583c.tar.gz
llvm-73362c820bad20e545d37b8a2414c35c0d3d583c.tar.bz2
llvm-73362c820bad20e545d37b8a2414c35c0d3d583c.tar.xz
RegionInfo: Do not assert if a BB is not part of the dominance tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/RegionInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp
index 27cee76e08..abc057a773 100644
--- a/lib/Analysis/RegionInfo.cpp
+++ b/lib/Analysis/RegionInfo.cpp
@@ -136,14 +136,16 @@ bool Region::isSimple() const {
return false;
for (pred_iterator PI = pred_begin(entry), PE = pred_end(entry); PI != PE;
- ++PI)
- if (!contains(*PI)) {
+ ++PI) {
+ BasicBlock *Pred = *PI;
+ if (DT->getNode(Pred) && !contains(Pred)) {
if (found) {
isSimple = false;
break;
}
found = true;
}
+ }
found = false;