1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Add checks to ensure that there are no unreachable blocks in the function

llvm-svn: 14725
This commit is contained in:
Chris Lattner 2004-07-09 16:44:37 +00:00
parent 75bbce2fdb
commit 456583c52c

View File

@ -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;
}