aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-09 01:51:43 +0000
committerChris Lattner <sabre@nondot.org>2010-03-09 01:51:43 +0000
commitc3b70f636f9965f0d1938dd645dd7f848804a1f1 (patch)
tree2ba9402698cb91f6757e8a1097175ed7d8236917 /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent5ca47a4bdc271ef2ab5c6b65d0025a3506cc23dc (diff)
downloadllvm-c3b70f636f9965f0d1938dd645dd7f848804a1f1.zip
llvm-c3b70f636f9965f0d1938dd645dd7f848804a1f1.tar.gz
llvm-c3b70f636f9965f0d1938dd645dd7f848804a1f1.tar.bz2
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. llvm-svn: 98031
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index 5052af7b..72fb9fd 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/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;
}