[PATCH] D114452: [DebugInfo][InstrRef][X86] Instrument expanded DYN_ALLOCA_ instructions with instruction numbers

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 24 09:54:31 PST 2021


jmorse added inline comments.


================
Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:1050
+      MF.makeDebugValueSubstitution(
+          *InstrNum, {ModInst->getDebugInstrNum(), NumCallOps - 1});
+    }
----------------
Orlando wrote:
> nits: Do you need `NumCallOps`? Is it not the same as `ModInst->getNumOperands()` here?
> 
> And since `ModInst == CI` on this code path (right?) IMO it would be clearer to refer to `CI` directly here.
Updated to use getNumOperands. Also, apparently I couldn't count in the previous version, because now we need to subtract two (one for it being penultimate op, one for it being zero-based).

IMHO it's better to use ModInst -- it avoids having to think about the earlier control flow. YMMV?


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

https://reviews.llvm.org/D114452



More information about the llvm-commits mailing list