diff options
| author | Dan Gohman <gohman@apple.com> | 2009-12-05 00:44:40 +0000 | 
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-12-05 00:44:40 +0000 | 
| commit | 047a767d745eebfe80743603530622f0aa775540 (patch) | |
| tree | ddab61210dacd0d33679cd2250d37b519c5368ed /llvm/lib/CodeGen | |
| parent | 0b44cb0d78759c299f39022b184dce05c7468b9f (diff) | |
| download | bcm5719-llvm-047a767d745eebfe80743603530622f0aa775540.tar.gz bcm5719-llvm-047a767d745eebfe80743603530622f0aa775540.zip  | |
Remove the target hook TargetInstrInfo::BlockHasNoFallThrough in favor of
MachineBasicBlock::canFallThrough(), which is target-independent and more
thorough.
llvm-svn: 90634
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 9 | 
2 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index 9fd95fde635..3887e6d44e4 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -1140,7 +1140,7 @@ ReoptimizeBlock:        // falls through into MBB and we can't understand the prior block's branch        // condition.        if (MBB->empty()) { -        bool PredHasNoFallThrough = TII->BlockHasNoFallThrough(PrevBB); +        bool PredHasNoFallThrough = !PrevBB.canFallThrough();          if (PredHasNoFallThrough || !PriorUnAnalyzable ||              !PrevBB.isSuccessor(MBB)) {            // If the prior block falls through into us, turn it into an diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index d9f4c997b90..917d0535b2b 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -376,15 +376,6 @@ MachineVerifier::visitMachineBasicBlockBefore(const MachineBasicBlock *MBB) {          report("MBB doesn't fall through but is empty!", MBB);        }      } -    if (TII->BlockHasNoFallThrough(*MBB)) { -      if (MBB->empty()) { -        report("TargetInstrInfo says the block has no fall through, but the " -               "block is empty!", MBB); -      } else if (!MBB->back().getDesc().isBarrier()) { -        report("TargetInstrInfo says the block has no fall through, but the " -               "block does not end in a barrier!", MBB); -      } -    }    } else {      // Block is last in function.      if (MBB->empty()) {  | 

