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

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 08:40:20 PDT 2019


jmorse added inline comments.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:881
+        // the open range, and insert an explicit DBG_VALUE $noreg. Reg clobbers
+        // can be detected by DbgEntityHistoryCalculator, but stack writes are
+        // not.
----------------
aprantl wrote:
> One last question: Could/should we fix this in DbgEntityHistoryCalculator instead?
Overall it would make more sense to fix it in DbgEntityHistoryCalculator, that way the two logically similar things (working out when a location no longer contains the desired value) would happen in the same place. However, doing so would require parsing a DIExpression to work out where in the stack frame a DBG_VALUE points, which IMO is generally a bad plan.

My feeling is that creating some undef DBG_VALUEs here where the information is readily available is better than parsing a DIExpression at a later stage.


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

https://reviews.llvm.org/D66941





More information about the llvm-commits mailing list