From: Evan Cheng Date: Sat, 10 Feb 2007 02:43:39 +0000 (+0000) Subject: Add function live-ins to entry block live-in set. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ad2070c667ebabf1650be63e6b3e0b411da86918;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 3b7fb6b58f6..ae7a495bf48 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; }