[PATCH] Teach DeadArgElimination not to eliminate return valuesof functions with 'returned' arguments

Stephen Lin swlin at post.harvard.edu
Mon Jun 24 15:23:18 PDT 2013


> The problem is this canonical form inhibits tail calls, which is an
> important optimization.  We could have a smarter tail call pass to recover
> the information later on, though.
> (I must confess I only skimmed through this thread, so sorry if this comment
> has been made before.  Just wanted to make sure you remembered of this
> detail).

The target-independent call lowering code can see through 'returned'
to detect tail call opportunities, actually, so that's not an issue :)
(This was added as part of the initial patch with 'returned', r179925,
in /lib/CodeGen/Analysis.cpp)

Stephen



More information about the llvm-commits mailing list