]> granicus.if.org Git - llvm/commitdiff
Remove the unused DBG_VALUE offset parameter from RegAllocFast (NFC)
authorAdrian Prantl <aprantl@apple.com>
Fri, 28 Jul 2017 22:36:55 +0000 (22:36 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 28 Jul 2017 22:36:55 +0000 (22:36 +0000)
Followup to r309426.
rdar://problem/33580047

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309446 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocFast.cpp

index d5538be4bba25e15b948f01ee80365608d519986..fd6c2877667dd2158bc38cd5bb08e3a080e72088 100644 (file)
@@ -879,7 +879,9 @@ void RAFast::AllocateBasicBlock() {
             else {
               // Modify DBG_VALUE now that the value is in a spill slot.
               bool IsIndirect = MI->isIndirectDebugValue();
-              uint64_t Offset = IsIndirect ? MI->getOperand(1).getImm() : 0;
+              if (IsIndirect)
+                assert(MI->getOperand(1).getImm() == 0 &&
+                       "DBG_VALUE with nonzero offset");
               const MDNode *Var = MI->getDebugVariable();
               const MDNode *Expr = MI->getDebugExpression();
               DebugLoc DL = MI->getDebugLoc();
@@ -890,7 +892,7 @@ void RAFast::AllocateBasicBlock() {
               MachineInstr *NewDV = BuildMI(*MBB, MBB->erase(MI), DL,
                                             TII->get(TargetOpcode::DBG_VALUE))
                                         .addFrameIndex(SS)
-                                        .addImm(Offset)
+                                        .addImm(0U)
                                         .addMetadata(Var)
                                         .addMetadata(Expr);
               DEBUG(dbgs() << "Modifying debug info due to spill:"