[PATCH] [DWARF] Fix a few corner cases in expression emission
Adrian Prantl
aprantl at apple.com
Mon Jun 8 09:54:21 PDT 2015
Thanks for looking into this! I have a few questions inline.
REPOSITORY
rL LLVM
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1565
@@ -1564,1 +1564,3 @@
for (const auto &Entry : DebugLocs.getEntries(List)) {
+ if (Entry.BeginSym == Entry.EndSym)
+ continue;
----------------
Hopefully this can become an assertion with Duncan's pending patch.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfExpression.cpp:219
@@ -214,3 +218,3 @@
case dwarf::DW_OP_plus: {
// [DW_OP_reg,Offset,DW_OP_plus,DW_OP_deref] --> [DW_OP_breg,Offset].
auto N = I.getNext();
----------------
This comment now needs to be moved down to the "if (DW_OP_deref)" block.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfExpression.cpp:237
@@ +236,3 @@
+ } else {
+ ValidReg = AddMachineRegIndirect(MachineReg, Offset);
+ IsOnStack = true;
----------------
The indirection here seems wrong:
To reach this clause, we need an expression like "DW_OP_reg Offset DW_OP_plus (DW_OP_bit_Piece x y)?"
Shouldn't this be just an unconditional AddMachineRegPiece()?
http://reviews.llvm.org/D10302
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list