diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 02:24:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 02:24:55 +0000 |
commit | 07293da97ebf4028f95ba0b9c0a6f200b4c03ebc (patch) | |
tree | 0917798ad23681a01f9ac64d427542f60a4d9a14 /llvm/lib/CodeGen/UnreachableBlockElim.cpp | |
parent | ee95d4c61cba2d8d51a92db962d51d24bb37b23b (diff) | |
download | bcm5719-llvm-07293da97ebf4028f95ba0b9c0a6f200b4c03ebc.tar.gz bcm5719-llvm-07293da97ebf4028f95ba0b9c0a6f200b4c03ebc.zip |
eliminate InvalidateLabel and LabelIDList from MMI and replace
them with a counter.
llvm-svn: 98462
Diffstat (limited to 'llvm/lib/CodeGen/UnreachableBlockElim.cpp')
-rw-r--r-- | llvm/lib/CodeGen/UnreachableBlockElim.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/UnreachableBlockElim.cpp b/llvm/lib/CodeGen/UnreachableBlockElim.cpp index b0f0a07420c..7b338126d47 100644 --- a/llvm/lib/CodeGen/UnreachableBlockElim.cpp +++ b/llvm/lib/CodeGen/UnreachableBlockElim.cpp @@ -165,20 +165,8 @@ bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) { } // Actually remove the blocks now. - for (unsigned i = 0, e = DeadBlocks.size(); i != e; ++i) { - MachineBasicBlock *MBB = DeadBlocks[i]; - // If there are any labels in the basic block, unregister them from - // MachineModuleInfo. - if (MMI && !MBB->empty()) { - for (MachineBasicBlock::iterator I = MBB->begin(), - E = MBB->end(); I != E; ++I) { - if (I->isLabel()) - // The label ID # is always operand #0, an immediate. - MMI->InvalidateLabel(I->getOperand(0).getImm()); - } - } - MBB->eraseFromParent(); - } + for (unsigned i = 0, e = DeadBlocks.size(); i != e; ++i) + DeadBlocks[i]->eraseFromParent(); // Cleanup PHI nodes. for (MachineFunction::iterator I = F.begin(), E = F.end(); I != E; ++I) { |