summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-14 17:05:00 +0000
committerDan Gohman <gohman@apple.com>2010-04-14 17:05:00 +0000
commitb13033f61c897224a0be2784faa721ff294c5254 (patch)
tree450ee1332622170c53b1d3b10d3ac594fd604cc1
parentc0fb65da040668df543db514f05e4be571edf700 (diff)
downloadllvm-b13033f61c897224a0be2784faa721ff294c5254.tar.gz
llvm-b13033f61c897224a0be2784faa721ff294c5254.tar.bz2
llvm-b13033f61c897224a0be2784faa721ff294c5254.tar.xz
Move the code for initialing the entry block livein set out of
SelectionDAGISel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101258 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/MachineRegisterInfo.cpp5
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp5
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/MachineRegisterInfo.cpp b/lib/CodeGen/MachineRegisterInfo.cpp
index 6c0b454b13..850ade25da 100644
--- a/lib/CodeGen/MachineRegisterInfo.cpp
+++ b/lib/CodeGen/MachineRegisterInfo.cpp
@@ -248,6 +248,11 @@ MachineRegisterInfo::EmitLiveInCopies(MachineBasicBlock *EntryMBB,
(void) Emitted;
}
}
+
+ // Add function live-ins to entry block live-in set.
+ for (MachineRegisterInfo::livein_iterator I = livein_begin(),
+ E = livein_end(); I != E; ++I)
+ EntryMBB->addLiveIn(I->first);
}
#ifndef NDEBUG
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 2f89aa04a9..a17119be11 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -221,11 +221,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
// emitting the code for the block.
RegInfo->EmitLiveInCopies(MF->begin(), TRI, TII);
- // Add function live-ins to entry block live-in set.
- for (MachineRegisterInfo::livein_iterator I = RegInfo->livein_begin(),
- E = RegInfo->livein_end(); I != E; ++I)
- MF->begin()->addLiveIn(I->first);
-
#ifndef NDEBUG
assert(FuncInfo->CatchInfoFound.size() == FuncInfo->CatchInfoLost.size() &&
"Not all catch info was assigned to a landing pad!");