[PATCH] D70121: [DebugInfo][LDV] Teach LDV how to identify source variables and handle fragments

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 28 00:56:16 PST 2019


djtodoro added a comment.

> I'm not sure if that's possible here. Everything seems quite interdependent, and the bug fix (functionality change) happens as a result of the structural change (also a functionality change).
> I could split this into two or more dependant patches and keep 'related' things together. For example, put all the debug print() updates in a single patch. Not sure that this would this help though, what do you think?
> There is a very small change/fix to DbgValueLocation which I included in this patch. I could take that out (and probably should) but it won't have a noticable impact on the diff size.

I see. The semantic of the change does not allow us to get it shorter, so I am OK with that. Thanks for considering that!



================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:742
+    SrcVar->addDef(Idx, MI.getOperand(0), Expr);
   else {
+    SrcVar->addDef(Idx, getUndefMO(), Expr);
----------------
Do not need the braces anymore.


================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:1043
+  for (auto &SrcVar : sourceVariables) {
+    for (const auto &Frag : *SrcVar) {
+      Frag->computeIntervals(*SrcVar, MF->getRegInfo(), *TRI, *LIS, LS);
----------------
`Frag` ==> `Fragment`


================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:1488
+  for (auto &SrcVar : sourceVariables) {
+    for (const auto &Frag : *SrcVar) {
+      LLVM_DEBUG(Frag->print(dbgs(), SrcVar->getVariable(),
----------------
`Frag` ==> `Fragment`


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

https://reviews.llvm.org/D70121





More information about the llvm-commits mailing list