[PATCH] D82363: [DebugInfo] Add new instruction and expression operator for variadic debug values

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 02:53:18 PST 2021


jmorse added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocFast.cpp:432
+      MachineOperand &MO = DBG->getDebugOperand(0);
+      if (MO.isReg() && MO.getReg() == 0) {
+        updateDbgValueForSpill(*DBG, FI, 0);
----------------
StephenTozer wrote:
> jmorse wrote:
> > Is this rewriting
> >   DBG_VALUE $noreg
> > to
> >   DBG_VALUE %stack.0
> > ?
> > 
> > Obviously this patch just preserves old behaviour, which is fine, but I get the feeling that the old behaviour is wrong.
> I'll have to run through RegAllocFast again to be sure of the full behaviour here... as far as I understand, the intent here is that if the DBG_VALUE used the spilled virtual register but was unassigned for some reason in this pass, then we recover it using the spilled value here. I think that that could be valid, but I don't understand why the location would be set to `$noreg` if the virtual register hasn't been totally removed yet (which it shouldn't be if it's being spilled here).
Cool; not a blocker to landing of course.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82363



More information about the llvm-commits mailing list