[llvm-branch-commits] [llvm-branch] r100822 - in /llvm/branches/Apple/Morbo/lib: CodeGen/SelectionDAG/InstrEmitter.cpp Target/ARM/ARMBaseInstrInfo.cpp Target/MSP430/MSP430InstrInfo.cpp Target/PowerPC/PPCInstrInfo.cpp Target/X86/X86InstrInfo.cpp

Dale Johannesen dalej at apple.com
Thu Apr 8 15:32:01 PDT 2010


Author: johannes
Date: Thu Apr  8 17:32:01 2010
New Revision: 100822

URL: http://llvm.org/viewvc/llvm-project?rev=100822&view=rev
Log:
--- Merging r100566 into '.':
U    lib/CodeGen/SelectionDAG/InstrEmitter.cpp
--- Merging r100681 into '.':
U    lib/Target/X86/X86InstrInfo.cpp
U    lib/Target/MSP430/MSP430InstrInfo.cpp
U    lib/Target/PowerPC/PPCInstrInfo.cpp
U    lib/Target/ARM/ARMBaseInstrInfo.cpp


Modified:
    llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
    llvm/branches/Apple/Morbo/lib/Target/ARM/ARMBaseInstrInfo.cpp
    llvm/branches/Apple/Morbo/lib/Target/MSP430/MSP430InstrInfo.cpp
    llvm/branches/Apple/Morbo/lib/Target/PowerPC/PPCInstrInfo.cpp
    llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp

Modified: llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/InstrEmitter.cpp?rev=100822&r1=100821&r2=100822&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/InstrEmitter.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Thu Apr  8 17:32:01 2010
@@ -517,8 +517,19 @@
   const TargetInstrDesc &II = TII->get(TargetOpcode::DBG_VALUE);
   MachineInstrBuilder MIB = BuildMI(*MF, DL, II);
   if (SD->getKind() == SDDbgValue::SDNODE) {
-    AddOperand(&*MIB, SDValue(SD->getSDNode(), SD->getResNo()),
-               (*MIB).getNumOperands(), &II, VRBaseMap, true /*IsDebug*/);
+    SDNode *Node = SD->getSDNode();
+    SDValue Op = SDValue(Node, SD->getResNo());
+    // It's possible we replaced this SDNode with other(s) and therefore
+    // didn't generate code for it.  It's better to catch these cases where
+    // they happen and transfer the debug info, but trying to guarantee that
+    // in all cases would be very fragile; this is a safeguard for any
+    // that were missed.
+    DenseMap<SDValue, unsigned>::iterator I = VRBaseMap.find(Op);
+    if (I==VRBaseMap.end())
+      MIB.addReg(0U);       // undef
+    else
+      AddOperand(&*MIB, Op, (*MIB).getNumOperands(), &II, VRBaseMap,
+                 true /*IsDebug*/);
   } else if (SD->getKind() == SDDbgValue::CONST) {
     Value *V = SD->getConst();
     if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {

Modified: llvm/branches/Apple/Morbo/lib/Target/ARM/ARMBaseInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=100822&r1=100821&r2=100822&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/ARM/ARMBaseInstrInfo.cpp Thu Apr  8 17:32:01 2010
@@ -454,6 +454,7 @@
     case TargetOpcode::KILL:
     case TargetOpcode::DBG_LABEL:
     case TargetOpcode::EH_LABEL:
+    case TargetOpcode::DBG_VALUE:
       return 0;
     }
     break;

Modified: llvm/branches/Apple/Morbo/lib/Target/MSP430/MSP430InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/MSP430/MSP430InstrInfo.cpp?rev=100822&r1=100821&r2=100822&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/MSP430/MSP430InstrInfo.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/MSP430/MSP430InstrInfo.cpp Thu Apr  8 17:32:01 2010
@@ -360,6 +360,7 @@
     case TargetOpcode::EH_LABEL:
     case TargetOpcode::IMPLICIT_DEF:
     case TargetOpcode::KILL:
+    case TargetOpcode::DBG_VALUE:
       return 0;
     case TargetOpcode::INLINEASM: {
       const MachineFunction *MF = MI->getParent()->getParent();

Modified: llvm/branches/Apple/Morbo/lib/Target/PowerPC/PPCInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/PowerPC/PPCInstrInfo.cpp?rev=100822&r1=100821&r2=100822&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/PowerPC/PPCInstrInfo.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/PowerPC/PPCInstrInfo.cpp Thu Apr  8 17:32:01 2010
@@ -765,6 +765,7 @@
   case PPC::DBG_LABEL:
   case PPC::EH_LABEL:
   case PPC::GC_LABEL:
+  case PPC::DBG_VALUE:
     return 0;
   default:
     return 4; // PowerPC instructions are all 4 bytes

Modified: llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp?rev=100822&r1=100821&r2=100822&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp Thu Apr  8 17:32:01 2010
@@ -3402,6 +3402,7 @@
     }
     case TargetOpcode::DBG_LABEL:
     case TargetOpcode::EH_LABEL:
+    case TargetOpcode::DBG_VALUE:
       break;
     case TargetOpcode::IMPLICIT_DEF:
     case TargetOpcode::KILL:





More information about the llvm-branch-commits mailing list