[PATCH] D111317: [DebugInfo][InstrRef] Track instructions that write-to-stack after having a spill fused into them

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 04:19:25 PDT 2021


jmorse added inline comments.


================
Comment at: llvm/test/DebugInfo/MIR/InstrRef/memory-operand-tracking.mir:54-57
+    ;; We should _not_ be able to find the old value.
+    DBG_INSTR_REF 1, 0, !11, !DIExpression(), debug-location !12
+    ; CHECK:      DBG_INSTR_REF 1, 0
+    ; CHECK-NEXT: DBG_VALUE $noreg
----------------
jmorse wrote:
> Orlando wrote:
> > What is the purpose of this part of the test?
> It's testing that the old value, `DBG_PHI $rax, 1`, can't be found anywhere. It's moderately important as the INC32m's write to the stack should terminate any earlier values being tracked.
> 
> Thinking about it, this test should also check that variables _currently_ located on the stack get terminated if it's overwritten, i.e.:
> 
>   SOMEINST debug-instr-number 1 ::(store 8 into %stack.0)
>   DBG_INSTR_REF 1, 1000000
>   OTHERINST ::(store 8 into %stack.0)
> 
> needs an explicit DBG_VALUE $noreg after OTHERINST overwrites the stack locataion. DbgEntityHistoryCalculator isn't aware of memory stores.
(To uh, be clear, I'll fold better explanations into this).


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

https://reviews.llvm.org/D111317



More information about the llvm-commits mailing list