diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-02-10 02:43:39 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-02-10 02:43:39 +0000 |
commit | ad2070c667ebabf1650be63e6b3e0b411da86918 (patch) | |
tree | 40f968be0f13321f6c4ee2865df56c5352498f28 | |
parent | 13d828567812041c1ca1817f4b66fce840903a1f (diff) |
Add function live-ins to entry block live-in set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34112 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 3b7fb6b58f..ae7a495bf4 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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; } |