summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
diff options
context:
space:
mode:
authorDjordje Todorovic <djordje.todorovic@rt-rk.com>2019-07-12 09:45:12 +0000
committerDjordje Todorovic <djordje.todorovic@rt-rk.com>2019-07-12 09:45:12 +0000
commit0739ccd3b588a6f2562bdc5a8f8847a49356394e (patch)
tree29ee68538b3ada08ad9dcf774d33a2ceb92121a4 /llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
parent210a9b6aee625f5924281a8ee36036396fff1450 (diff)
downloadbcm5719-llvm-0739ccd3b588a6f2562bdc5a8f8847a49356394e.tar.gz
bcm5719-llvm-0739ccd3b588a6f2562bdc5a8f8847a49356394e.zip
Revert "[DwarfDebug] Dump call site debug info"
A build failure was found on the SystemZ platform. This reverts commit 9e7e73578e54cd22b3c7af4b54274d743b6607cc. llvm-svn: 365886
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp36
1 files changed, 6 insertions, 30 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
index 436852bda92..2858afaa1cf 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
@@ -241,20 +241,15 @@ bool DwarfExpression::addMachineRegExpression(const TargetRegisterInfo &TRI,
return false;
}
- // Handle simple register locations. If we are supposed to
- // emit a call site parameter expression and if that expression
- // is just a register location, emit it with addBReg and offset 0,
- // because we should emit a DWARF expression representing a value,
- // rather than a location.
- if (!isMemoryLocation() && !HasComplexExpression &&
- (!isParameterValue() || isEntryValue())) {
+ // Handle simple register locations.
+ if (!isMemoryLocation() && !HasComplexExpression) {
for (auto &Reg : DwarfRegs) {
if (Reg.DwarfRegNo >= 0)
addReg(Reg.DwarfRegNo, Reg.Comment);
addOpPiece(Reg.Size);
}
- if (isEntryValue() && !isParameterValue() && DwarfVersion >= 4)
+ if (isEntryValue() && DwarfVersion >= 4)
emitOp(dwarf::DW_OP_stack_value);
DwarfRegs.clear();
@@ -345,16 +340,7 @@ void DwarfExpression::addExpression(DIExpressionCursor &&ExprCursor,
while (ExprCursor) {
auto Op = ExprCursor.take();
- uint64_t OpNum = Op->getOp();
- if (OpNum >= dwarf::DW_OP_reg0 && OpNum <= dwarf::DW_OP_reg31) {
- if (isParameterValue())
- addBReg(OpNum - dwarf::DW_OP_reg0, 0);
- else
- emitOp(OpNum);
- continue;
- }
-
- switch (OpNum) {
+ switch (Op->getOp()) {
case dwarf::DW_OP_LLVM_fragment: {
unsigned SizeInBits = Op->getArg(1);
unsigned FragmentOffset = Op->getArg(0);
@@ -403,7 +389,7 @@ void DwarfExpression::addExpression(DIExpressionCursor &&ExprCursor,
case dwarf::DW_OP_lit0:
case dwarf::DW_OP_not:
case dwarf::DW_OP_dup:
- emitOp(OpNum);
+ emitOp(Op->getOp());
break;
case dwarf::DW_OP_deref:
assert(!isRegisterLocation());
@@ -472,22 +458,12 @@ void DwarfExpression::addExpression(DIExpressionCursor &&ExprCursor,
case dwarf::DW_OP_LLVM_tag_offset:
TagOffset = Op->getArg(0);
break;
- case dwarf::DW_OP_regx:
- if (isParameterValue()) {
- emitOp(dwarf::DW_OP_bregx);
- emitUnsigned(Op->getArg(0));
- emitSigned(Op->getArg(1));
- } else {
- emitOp(dwarf::DW_OP_regx);
- emitUnsigned(Op->getArg(0));
- }
- break;
default:
llvm_unreachable("unhandled opcode found in expression");
}
}
- if (isImplicitLocation() && !isParameterValue())
+ if (isImplicitLocation())
// Turn this into an implicit location description.
addStackValue();
}
OpenPOWER on IntegriCloud