[PATCH] D67398: [DebugInfo] LiveDebugValues: Move DBG_VALUE creation into VarLoc class

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 04:39:50 PDT 2019


djtodoro added inline comments.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:262
+      VarLoc VL(MI, LS);
+      VL.Kind = EntryValueKind;
+      VL.Expr = EntryExpr;
----------------
jmorse wrote:
> djtodoro wrote:
> > Is this redundant, since we already set the Kind within the `VarLoc`'s constructor?
> This is deliberately building a VarLoc from the register location in `MI`, then modifying it to be an entry value.
> 
> This could be done differently, but I thought a function that "turns this existing DBG_VALUE into an entry-value VarLoc" would be simpler than building a whole VarLoc from scratch. I'll update the comment to indicate that's what I intended.
Thanks.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:304
+        // are not recognized, and not handled here.
+        auto *SpillExpr = DIExpression::prepend(DIExpr, DIExpression::ApplyOffset,
+                                                Loc.SpillLocation.SpillOffset);
----------------
clang-format please


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

https://reviews.llvm.org/D67398





More information about the llvm-commits mailing list