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

Stephen Lin swlin at post.harvard.edu
Thu Jun 27 13:37:20 PDT 2013


On Thu, Jun 27, 2013 at 1:00 PM, Stephen Lin <swlin at post.harvard.edu> wrote:
> Hi Dan,
>
> Can you clarify if you have any more objection to the current patch?
> From my understanding (correct me if I'm wrong) your remaining
> objection is not with what 'returned' is doing but with how it is
> doing it.
>
> I'm fine continuing this discussing further and have really no qualms
> in changing the IR attribute if we can form a consensus in a better
> representation ('returned' was in the 3.3 release but I highly doubt
> that there will be any out-of-tree dependencies anytime
> soon.)...however, the current patch is merely a bug fix to ensure that
> DAE does not generate invalid IR (as it is currently defined and
> checked by the verifier) so that clang can start using this
> optimization.
>
> Also, separately, can anyone review this patch for correctness?
>
> Stephen

Apologies, did not include tests with that version. Here's an update
with those included.

Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: returned-lto-fix-with-tests.patch
Type: application/octet-stream
Size: 7499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130627/a04d6caf/attachment.obj>


More information about the llvm-commits mailing list