Remove minimal CFG sanity checks from verifier.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 22 Dec 2009 21:52:27 +0000 (21:52 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 22 Dec 2009 21:52:27 +0000 (21:52 +0000)
These checks would often trigger on unreachable statements inserted by
bugpoint, leading it astray.

It would be nice if we could distinguish unreachable blocks from errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91923 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineVerifier.cpp

index 959269f85f2f03775081671e769231b9d33f0c31..077231904631728822cdcf588810ca40eced2648 100644 (file)
@@ -365,24 +365,6 @@ void
 MachineVerifier::visitMachineBasicBlockBefore(const MachineBasicBlock *MBB) {
   const TargetInstrInfo *TII = MF->getTarget().getInstrInfo();
 
-  // Start with minimal CFG sanity checks.
-  MachineFunction::const_iterator MBBI = MBB;
-  ++MBBI;
-  if (MBBI != MF->end()) {
-    // Block is not last in function.
-    if (!MBB->isSuccessor(MBBI)) {
-      // Block does not fall through.
-      if (MBB->empty()) {
-        report("MBB doesn't fall through but is empty!", MBB);
-      }
-    }
-  } else {
-    // Block is last in function.
-    if (MBB->empty()) {
-      report("MBB is last in function but is empty!", MBB);
-    }
-  }
-
   // Call AnalyzeBranch. If it succeeds, there several more conditions to check.
   MachineBasicBlock *TBB = 0, *FBB = 0;
   SmallVector<MachineOperand, 4> Cond;