projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ca2dc0
)
Add checks to ensure that there are no unreachable blocks in the function
author
Chris Lattner
<sabre@nondot.org>
Fri, 9 Jul 2004 16:44:37 +0000
(16:44 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 9 Jul 2004 16:44:37 +0000
(16:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14725
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/LiveVariables.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/LiveVariables.cpp
b/lib/CodeGen/LiveVariables.cpp
index cc924c3cc4474cf79e4966c4fdb11de62b65f49a..d26848cb1c6399cff6d6bb5603cc6186d8e6d975 100644
(file)
--- a/
lib/CodeGen/LiveVariables.cpp
+++ b/
lib/CodeGen/LiveVariables.cpp
@@
-291,6
+291,14
@@
bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
i + MRegisterInfo::FirstVirtualRegister));
}
+ // Check to make sure there are no unreachable blocks in the MC CFG for the
+ // function. If so, it is due to a bug in the instruction selector or some
+ // other part of the code generator if this happens.
+#ifndef NDEBUG
+ for(MachineFunction::iterator i = MF.begin(), e = MF.end(); i != e; ++i)
+ assert(Visited.count(&*i) != 0 && "unreachable basic block found");
+#endif
+
return false;
}