[PATCH] D66941: [DebugInfo] LiveDebugValues: explicitly terminate overwritten stack locations

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 14:22:43 PDT 2019


aprantl added a comment.

> Currently, if a stack spill location is overwritten to by another spill instruction, nothing notices and any variables located in that slot are not terminated.

Are all DBG_VALUEs pointing to spill slots created by LiveDebugValues and is this indicative of a bug elsewhere, i.e., should we instead make sure to insert a `DBG_VALUE undef, var` right before the value is popped from the spill slot (followed by a DBG_VALUE pointing to the restored register)?



================
Comment at: lib/CodeGen/LiveDebugValues.cpp:357
+
+  /// Decide if @MI is a spill instruction and return true if it is. We use 2
+  /// criteria to make this decision:
----------------
out of curiosity: is `@MI` legal doxygen?


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:870
 
-  if (isSpillInstruction(MI, MF, Reg)) {
+  // First, if this is a spill instruction then terminate any variables at the
+  // stack location. The value in memory will have changed.
----------------
any previous DBG_VALUEs pointing to the spill slot? or does this mean something else?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D66941





More information about the llvm-commits mailing list