[PATCH] D87233: [POC][DebugInfo] Use entry values within IR

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 08:58:06 PDT 2020


StephenTozer accepted this revision.
StephenTozer added a comment.
This revision is now accepted and ready to land.

LGTM. I think the Implicit flag idea might be able to be folded into this patch without much issue, but it's not urgent and can definitely be shifted to another patch (or even just left as a TODO).



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp:303
     if (isEntryValue() && !isIndirect() && !isParameterValue() &&
-        DwarfVersion >= 4)
+        DwarfVersion >= 4 && !HasComplexExpression)
       emitOp(dwarf::DW_OP_stack_value);
----------------
With regards to the comment below about using an Implicit location, this would be a good place to do it I think. If you set `LocationKind = isIndirect() ? Memory : Implicit`, then `DwarfExpression::addExpression` will add the required stack value automatically at the end (in addition to removing the need to add `|| isEntryValue()` to the clauses below).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87233/new/

https://reviews.llvm.org/D87233



More information about the llvm-commits mailing list