From a34ec2290fa441d312ac33a61e6ec6029259bdef Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 9 Mar 2010 01:51:43 +0000 Subject: strength reduce MMI::MappedLabel to MMI::isLabelDeleted, and add a FIXME about how we are eventually going to zap this lookup table once mc world domination is complete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98031 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineModuleInfo.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lib/CodeGen/MachineModuleInfo.cpp') diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 5052af7bd8..72fb9fd987 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -185,7 +185,8 @@ void MachineModuleInfo::addCleanup(MachineBasicBlock *LandingPad) { void MachineModuleInfo::TidyLandingPads() { for (unsigned i = 0; i != LandingPads.size(); ) { LandingPadInfo &LandingPad = LandingPads[i]; - LandingPad.LandingPadLabel = MappedLabel(LandingPad.LandingPadLabel); + if (isLabelDeleted(LandingPad.LandingPadLabel)) + LandingPad.LandingPadLabel = 0; // Special case: we *should* emit LPs with null LP MBB. This indicates // "nounwind" case. @@ -195,17 +196,14 @@ void MachineModuleInfo::TidyLandingPads() { } for (unsigned j=0; j != LandingPads[i].BeginLabels.size(); ) { - unsigned BeginLabel = MappedLabel(LandingPad.BeginLabels[j]); - unsigned EndLabel = MappedLabel(LandingPad.EndLabels[j]); - - if (!BeginLabel || !EndLabel) { + unsigned BeginLabel = LandingPad.BeginLabels[j]; + unsigned EndLabel = LandingPad.EndLabels[j]; + if (isLabelDeleted(BeginLabel) || isLabelDeleted(EndLabel)) { LandingPad.BeginLabels.erase(LandingPad.BeginLabels.begin() + j); LandingPad.EndLabels.erase(LandingPad.EndLabels.begin() + j); continue; } - LandingPad.BeginLabels[j] = BeginLabel; - LandingPad.EndLabels[j] = EndLabel; ++j; } -- cgit v1.2.3-18-g5258