summaryrefslogtreecommitdiffstats
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
commit2ca8fb229c65519f85c3c1517d401d87535abb8b (patch)
treeb04527f159202bd7ebe8668360c9939945e5b6bf
parentd51c1a6e0981e72a6cd61e5f48efe7409d50a293 (diff)
downloadbcm5719-llvm-2ca8fb229c65519f85c3c1517d401d87535abb8b.tar.gz
bcm5719-llvm-2ca8fb229c65519f85c3c1517d401d87535abb8b.zip
Move the code for initialing the entry block livein set out of
SelectionDAGISel. llvm-svn: 101258
-rw-r--r--llvm/lib/CodeGen/MachineRegisterInfo.cpp5
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp5
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
index 6c0b454b13b..850ade25da5 100644
--- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp
+++ b/llvm/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/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 2f89aa04a9c..a17119be116 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/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!");
OpenPOWER on IntegriCloud