[llvm] r309446 - Remove the unused DBG_VALUE offset parameter from RegAllocFast (NFC)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 28 15:36:55 PDT 2017
Author: adrian
Date: Fri Jul 28 15:36:55 2017
New Revision: 309446
URL: http://llvm.org/viewvc/llvm-project?rev=309446&view=rev
Log:
Remove the unused DBG_VALUE offset parameter from RegAllocFast (NFC)
Followup to r309426.
rdar://problem/33580047
Modified:
llvm/trunk/lib/CodeGen/RegAllocFast.cpp
Modified: llvm/trunk/lib/CodeGen/RegAllocFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocFast.cpp?rev=309446&r1=309445&r2=309446&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocFast.cpp Fri Jul 28 15:36:55 2017
@@ -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:"
More information about the llvm-commits
mailing list