diff options
author | Jim Laskey <jlaskey@mac.com> | 2007-02-22 16:39:03 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2007-02-22 16:39:03 +0000 |
commit | 9df1a1d8d88cfc3b8472dfab41edb494261be25c (patch) | |
tree | eae9511e5f5f3550e8fcf03ab94dc891e81503cb /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | 69bd45c1d2f29eb609e34343672bc1f46ef1ff5c (diff) | |
download | bcm5719-llvm-9df1a1d8d88cfc3b8472dfab41edb494261be25c.tar.gz bcm5719-llvm-9df1a1d8d88cfc3b8472dfab41edb494261be25c.zip |
Remove isAccessable.
llvm-svn: 34497
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index 6c0434180e2..d6bedb844bd 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -67,7 +67,7 @@ FunctionPass *llvm::createBranchFoldingPass() { return new BranchFolder(); } /// RemoveDeadBlock - Remove the specified dead machine basic block from the /// function, updating the CFG. void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) { - assert(!MBB->isAccessable() && "MBB must be dead!"); + assert(MBB->pred_empty() && "MBB must be dead!"); DOUT << "\nRemoving MBB: " << *MBB; MachineFunction *MF = MBB->getParent(); @@ -440,7 +440,7 @@ bool BranchFolder::OptimizeBranches(MachineFunction &MF) { OptimizeBlock(MBB); // If it is dead, remove it. - if (!MBB->isAccessable()) { + if (MBB->pred_empty()) { RemoveDeadBlock(MBB); MadeChange = true; ++NumDeadBlocks; @@ -618,14 +618,14 @@ void BranchFolder::OptimizeBlock(MachineBasicBlock *MBB) { // explicitly. if (MBB->empty()) { // Dead block? Leave for cleanup later. - if (!MBB->isAccessable()) return; + if (MBB->pred_empty()) return; if (FallThrough == MBB->getParent()->end()) { // TODO: Simplify preds to not branch here if possible! } else { // Rewrite all predecessors of the old block to go to the fallthrough // instead. - while (MBB->isAccessable()) { + while (!MBB->pred_empty()) { MachineBasicBlock *Pred = *(MBB->pred_end()-1); ReplaceUsesOfBlockWith(Pred, MBB, FallThrough, TII); } |