[PATCH] D99048: [RFC][DebugInfo] Do not use the DBG_VALUE to calculate debug info of spill location

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 31 07:40:27 PDT 2021


jmorse added inline comments.


================
Comment at: llvm/lib/CodeGen/InlineSpiller.cpp:979
+      if (CopyReg.isValid())
+        TryKillReg();
       HSpiller.addToMergeableSpills(*FoldMI, StackSlot, Original);
----------------
dongAxis1944 wrote:
> @jmorse In addition, when regalloc tries to spill vreg to stack. llvm forget to mark kill flags for copy instruction. I think it might be useful for dwarf construction. What's your opinions?
Interesting -- I'm not very familiar with the kill flags, I've always relied on analysis passes to determine liveness information. If it's legitimate to place a a kill flag here, and it improves variable location tracking like you suggested in D41226, then it's probably a worthwhile improvement.

However, you should first check whether this causes LLVM to ever generate different code. I think most of the community doesn't want to change the code generated simply to improve debug-info (unless it's a trivial alteration).


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

https://reviews.llvm.org/D99048



More information about the llvm-commits mailing list