[PATCH] D114443: [DebugInfo][InstrRef] Cope with win32 calls changing the stack-pointer in LiveDebugValues

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


jmorse added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:1301-1309
+  // We always ignore SP defines on call instructions, they don't actually
+  // change the value of the stack pointer... except for win32's _chkstk. This
+  // is rare: filter quickly for the common case (no stack adjustments, not a
+  // call, etc). If it is a call that modifies SP, recognise the SP register
+  // defs.
+  bool CallChangesSP = false;
+  if (AdjustsStackInCalls && MI.isCall() && MI.getOperand(0).isSymbol() &&
----------------
Orlando wrote:
> Any reason not to stuff this all inside the `IgnoreSPAlias` lambda? Not a strong opinion.
Performance considerations -- the lambda might be called a lot, wouldn't want to use strcmp repeatedly when it can instead be used once.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114443



More information about the llvm-commits mailing list