summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-10 02:43:39 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-10 02:43:39 +0000
commit276b44b0f9e62167f3050a60ccbe42c3072de473 (patch)
treeccef253ef2edbe3f6f610262c955cfc54500c398
parentbcf1d7faef6237d6b72b5e89185825493655af30 (diff)
downloadbcm5719-llvm-276b44b0f9e62167f3050a60ccbe42c3072de473.tar.gz
bcm5719-llvm-276b44b0f9e62167f3050a60ccbe42c3072de473.zip
Add function live-ins to entry block live-in set.
llvm-svn: 34112
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 3b7fb6b58f6..ae7a495bf48 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -3891,6 +3891,14 @@ bool SelectionDAGISel::runOnFunction(Function &Fn) {
for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I)
SelectBasicBlock(I, MF, FuncInfo);
+ // Add function live-ins to entry block live-in set.
+ BasicBlock *EntryBB = &Fn.getEntryBlock();
+ BB = FuncInfo.MBBMap[EntryBB];
+ if (!MF.livein_empty())
+ for (MachineFunction::livein_iterator I = MF.livein_begin(),
+ E = MF.livein_end(); I != E; ++I)
+ BB->addLiveIn(I->first);
+
return true;
}
OpenPOWER on IntegriCloud