[PATCH] D36907: [codeview] support more DW_OPs for more complete debug info

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 11:48:20 PDT 2017


inglorion added inline comments.


================
Comment at: llvm/test/CodeGen/X86/codeview-nrvo.ll:73
+!21 = !DILocalVariable(name: "Result", scope: !10, file: !1, line: 10, type: !13)
+!22 = !DIExpression()
+!23 = !DILocation(line: 10, scope: !10)
----------------
rnk wrote:
> aprantl wrote:
> > Shouldn't the testcase include a complex expression?
> The dbg.declare gets lowered to a DEBUG_VALUE MI instruction with a DW_OP_deref. The complex DIExpression would be more obvious if this were a .mir test case. We probably want all of an IR NRVO test case, an MIR NRVO test case, and hand-crafted IR test cases with complex DIExpressions.
How can I make the DIExpressions more obvious in the MIR? I'm new to MIR, so I'm not sure what the best way to generate it is. I did llc -O0 -stop-after=prologepilog, which gives me machine IR that has the debug records that I want, but the MIR still has dbg.declare and empty DIExpressions, so I'm not sure that's what we want. I tried several other passes, with similar results. At some point, the translation from dbg.declare to dbg.value must happen, and there must be a point where we have DIExpressions with arithmetic and deref, but I can't seem to find an invocation that dumps this.


https://reviews.llvm.org/D36907





More information about the llvm-commits mailing list