[PATCH] D39305: Simplify codegen and debug info generation for block context parameters.

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 26 11:04:25 PDT 2017


aprantl added a comment.

In https://reviews.llvm.org/D39305#908208, @rjmccall wrote:

> The original code doesn't make any sense; it looks like the indirection is backwards.  We just built a debug variable corresponding to the block descriptor pointer parameter, so LocalAddr should be dbg.declare'd to be that variable and Arg should be dbg.value'd.  It looks like the real fix in your patch is just getting that right rather than anything to do with the alloca.


Correct. The alloca is just a simplification.

> I don't particularly care about eliminating the alloca, since there are plenty of other places where we emit allocas that we assume we can destroy, and a few easily-eliminated instructions in a scattered function isn't going to greatly contribute to -O build times.  So I think this patch is fine.

Thanks!


Repository:
  rL LLVM

https://reviews.llvm.org/D39305





More information about the cfe-commits mailing list