[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 07:21:03 PDT 2021


jmorse added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:1452-1457
+  // Strictly limit ourselves to plain loads and stores, not all instructions
+  // that can access the stack.
+  int FIDummy;
+  if (!TII->isStoreToStackSlotPostFE(MI, FIDummy) &&
+      !TII->isLoadFromStackSlotPostFE(MI, FIDummy))
+    return false;
----------------
Orlando wrote:
> This is repeated a few lines above, between 1442-1445 (patch juggling?)
Rats, missed this, and you're right it's patch juggling. I'll whip it out in an NFC commit later.


================
Comment at: llvm/test/DebugInfo/MIR/InstrRef/memory-operand-tracking.mir:39
+debugValueSubstitutions:
+- { srcinst: 2, srcop: 0, dstinst: 3, dstop: 1000000, subreg: 0 }
+stack:
----------------
Orlando wrote:
> Is there a way to make the IR printer/reader to print/read `MemOperand` or something instead of `1000000` (if yes and you agree - this could be a separate patch)?
I think for it to be well-formed JSON, we'd need some kind of flag indicating whether it's a "normal" operand or a memory reference, then make dstop optional. While that's a pain, it's probably easier to read; will need to be a later patch though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111317



More information about the llvm-commits mailing list