[PATCH] D51640: [DebugInfo] Normalize common kinds of DWARF sub-expressions.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 13:50:27 PDT 2018


probinson added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp:31
+    emitOp(dwarf::DW_OP_lit0 + Value);
+  else if (Value == ~0U) {
+    emitOp(dwarf::DW_OP_lit0);
----------------
aprantl wrote:
> probinson wrote:
> > aprantl wrote:
> > > These are 64 bit values. We either need ~0ULL or std::limits::max<uint64_t>().
> > The DWARF expression stack uses target-address-size values, and that isn't necessarily 64-bit.  I'm not sure we can make this compaction work in all cases.
> But if we do implement the 64-bit case, it will be correct there, we just don't get the more compact representation on a 32-bit arch, so that would still be win an many targets without breaking anything?
Acknowledging we're not compacting -1 on 32-bit targets, then okay.



https://reviews.llvm.org/D51640





More information about the llvm-commits mailing list