[PATCH] D129372: [DebugInfo][NFC?] Add new MachineOperand type and change DBG_INSTR_REF syntax

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 6 03:50:20 PDT 2022


jmorse added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineFunction.cpp:1192-1194
+    const MCInstrDesc &RefII = TII->get(TargetOpcode::DBG_VALUE_LIST);
     MI.setDesc(RefII);
+    MI.getDebugOperand(0).setReg(0);
----------------
jmorse wrote:
> StephenTozer wrote:
> > jmorse wrote:
> > > AFAIUI this isn't necessary at this stage (and could lead to test breakage), is that right? If so, better to fold into a "making DBG_VALUE_LIST everywhere" (or whatever it gets called in the end) patch.
> > The reason for making this change is just that it keeps the undef-ing simple, as converting it to a DBG_VALUE would now require us to move and add operands, and after the next patch in the stack also modify the DIExpression. Since it's an undef value either way it doesn't make any difference in the final output, and AFAIK doesn't cause much/any breakage with existing tests. But if you think the tradeoff is worth it then I'm open to doing the DBG_VALUE conversion, WDYT?
> SGTM
(i.e.: that sounds like a fine reason to make this change, no need for further work)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129372



More information about the llvm-commits mailing list