[llvm-commits] [llvm] r101901 - /llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Dan Gohman gohman at apple.com
Tue Apr 20 07:48:02 PDT 2010


Author: djg
Date: Tue Apr 20 09:48:02 2010
New Revision: 101901

URL: http://llvm.org/viewvc/llvm-project?rev=101901&view=rev
Log:
If a PHI node somehow has debug info, propogate it to the MachineInstr PHI.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp?rev=101901&r1=101900&r2=101901&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Tue Apr 20 09:48:02 2010
@@ -211,11 +211,11 @@
 
     // Create Machine PHI nodes for LLVM PHI nodes, lowering them as
     // appropriate.
-    DebugLoc DL;
     for (BasicBlock::const_iterator I = BB->begin();
          const PHINode *PN = dyn_cast<PHINode>(I); ++I) {
       if (PN->use_empty()) continue;
 
+      DebugLoc DL = PN->getDebugLoc();
       unsigned PHIReg = ValueMap[PN];
       assert(PHIReg && "PHI node does not have an assigned virtual register!");
 





More information about the llvm-commits mailing list