Normalize common kinds of DWARF sub-expressions to make debug info encoding a bit more compact:
- DW_OP_constu [X < 32] -> DW_OP_litX
- DW_OP_constu [all ones] -> DW_OP_lit0, DW_OP_not
Addresses Adrian's comments in https://reviews.llvm.org/D48676.
Paths
| Differential D51640
[DebugInfo] Normalize common kinds of DWARF sub-expressions. ClosedPublic Authored by JDevlieghere on Sep 4 2018, 9:05 AM.
Details Summary Normalize common kinds of DWARF sub-expressions to make debug info encoding a bit more compact:
Addresses Adrian's comments in https://reviews.llvm.org/D48676.
Diff Detail Event TimelineComment Actions Can you add a testcase for the 0xffffffff case?
This revision now requires changes to proceed.Sep 4 2018, 9:40 AM Comment Actions I generated some unrelated files while fixing the tests that were included in the previous diff.
Comment Actions LGTM, with outstanding changes addressed & perhaps add a note about how this doesn't trigger for 32-bit targets. Be sure to watch the bots afterwards, since we didn't emit DW_OP_LIT before AFAIK and LLDB may have bugs. Closed by commit rL341457: [DebugInfo] Normalize common kinds of DWARF sub-expressions. (authored by JDevlieghere). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 163866 llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
llvm/test/DebugInfo/AMDGPU/variable-locations.ll
llvm/test/DebugInfo/ARM/PR26163.ll
llvm/test/DebugInfo/ARM/split-complex.ll
llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll
llvm/test/DebugInfo/X86/PR26148.ll
llvm/test/DebugInfo/X86/constant-loclist.ll
llvm/test/DebugInfo/X86/dw_op_minus_direct.ll
llvm/test/DebugInfo/X86/partial-constant.ll
llvm/test/DebugInfo/X86/pieces-4.ll
llvm/test/DebugInfo/X86/split-global.ll
llvm/test/DebugInfo/X86/stack-value-dwarf4.ll
llvm/test/DebugInfo/X86/stack-value-piece.ll
|
These are 64 bit values. We either need ~0ULL or std::limits::max<uint64_t>().