[llvm] r309449 - Remove the unused DBG_VALUE offset parameter from GlobalISel (NFC)
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 28 15:46:20 PDT 2017
Author: adrian
Date: Fri Jul 28 15:46:20 2017
New Revision: 309449
URL: http://llvm.org/viewvc/llvm-project?rev=309449&view=rev
Log:
Remove the unused DBG_VALUE offset parameter from GlobalISel (NFC)
Followup to r309426.
rdar://problem/33580047
Modified:
llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
Modified: llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h?rev=309449&r1=309448&r2=309449&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h (original)
+++ llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h Fri Jul 28 15:46:20 2017
@@ -174,11 +174,12 @@ public:
const MDNode *Expr);
/// Build and insert a DBG_VALUE instruction expressing the fact that the
- /// associated \p Variable lives in memory at \p Reg + \p Offset (suitably
- /// modified by \p Expr).
- MachineInstrBuilder buildIndirectDbgValue(unsigned Reg, unsigned Offset,
+ /// associated \p Variable lives in memory at \p Reg (suitably modified by \p
+ /// Expr).
+ MachineInstrBuilder buildIndirectDbgValue(unsigned Reg,
const MDNode *Variable,
const MDNode *Expr);
+
/// Build and insert a DBG_VALUE instruction expressing the fact that the
/// associated \p Variable lives in the stack slot specified by \p FI
/// (suitably modified by \p Expr).
@@ -187,7 +188,7 @@ public:
/// Build and insert a DBG_VALUE instructions specifying that \p Variable is
/// given by \p C (suitably modified by \p Expr).
- MachineInstrBuilder buildConstDbgValue(const Constant &C, unsigned Offset,
+ MachineInstrBuilder buildConstDbgValue(const Constant &C,
const MDNode *Variable,
const MDNode *Expr);
Modified: llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp?rev=309449&r1=309448&r2=309449&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp Fri Jul 28 15:46:20 2017
@@ -682,11 +682,9 @@ bool IRTranslator::translateKnownIntrins
if (!V) {
// Currently the optimizer can produce this; insert an undef to
// help debugging. Probably the optimizer should not do this.
- MIRBuilder.buildIndirectDbgValue(0, 0, DI.getVariable(),
- DI.getExpression());
+ MIRBuilder.buildIndirectDbgValue(0, DI.getVariable(), DI.getExpression());
} else if (const auto *CI = dyn_cast<Constant>(V)) {
- MIRBuilder.buildConstDbgValue(*CI, 0, DI.getVariable(),
- DI.getExpression());
+ MIRBuilder.buildConstDbgValue(*CI, DI.getVariable(), DI.getExpression());
} else {
unsigned Reg = getOrCreateVReg(*V);
// FIXME: This does not handle register-indirect values at offset 0. The
Modified: llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp?rev=309449&r1=309448&r2=309449&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp Fri Jul 28 15:46:20 2017
@@ -96,15 +96,16 @@ MachineInstrBuilder MachineIRBuilder::bu
.addMetadata(Expr);
}
-MachineInstrBuilder MachineIRBuilder::buildIndirectDbgValue(
- unsigned Reg, unsigned Offset, const MDNode *Variable, const MDNode *Expr) {
+MachineInstrBuilder
+MachineIRBuilder::buildIndirectDbgValue(unsigned Reg, const MDNode *Variable,
+ const MDNode *Expr) {
assert(isa<DILocalVariable>(Variable) && "not a variable");
assert(cast<DIExpression>(Expr)->isValid() && "not an expression");
assert(cast<DILocalVariable>(Variable)->isValidLocationForIntrinsic(DL) &&
"Expected inlined-at fields to agree");
return buildInstr(TargetOpcode::DBG_VALUE)
.addReg(Reg, RegState::Debug)
- .addImm(Offset)
+ .addImm(0)
.addMetadata(Variable)
.addMetadata(Expr);
}
@@ -124,7 +125,6 @@ MachineInstrBuilder MachineIRBuilder::bu
}
MachineInstrBuilder MachineIRBuilder::buildConstDbgValue(const Constant &C,
- unsigned Offset,
const MDNode *Variable,
const MDNode *Expr) {
assert(isa<DILocalVariable>(Variable) && "not a variable");
@@ -144,7 +144,7 @@ MachineInstrBuilder MachineIRBuilder::bu
MIB.addReg(0U);
}
- return MIB.addImm(Offset).addMetadata(Variable).addMetadata(Expr);
+ return MIB.addImm(0).addMetadata(Variable).addMetadata(Expr);
}
MachineInstrBuilder MachineIRBuilder::buildFrameIndex(unsigned Res, int Idx) {
More information about the llvm-commits
mailing list