mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Add checks to ensure that there are no unreachable blocks in the function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14725 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ca2dc0710
commit
9fb6cf1d82
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user