[PATCH] D106659: [DebugInfo][InstrRef] Handle llvm.frameaddress intrinsics gracefully

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 05:16:15 PDT 2021


jmorse added inline comments.


================
Comment at: llvm/test/DebugInfo/X86/instr-ref-framereg-read.ll:7-8
+; Today, as a concession, we emit a DBG_PHI allowing the frame register value
+; to be read, but it could be expressed in other ways. Check that this works
+; outside of the entry block.
+
----------------
Orlando wrote:
> Why is it important to check outside of the entry block (it might be worth adding to the comment in the test too, ymmv)?
If the frame pointer is read in the entry block, there's a chance that it'll be interpreted as a function argument (i.e. a register not otherwise defined in the block). Depending on how the frame setup works, there might be instructions that def the frame register anyway in the entry block -- which wouldn't expose the problem this patch fixes.

(Folding this explanation into landing patch)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106659



More information about the llvm-commits mailing list