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

Dan Gohman dan433584 at gmail.com
Sun Jun 23 06:19:48 PDT 2013


On Thu, Jun 20, 2013 at 3:36 PM, Stephen Lin <swlin at post.harvard.edu> wrote:

> Hi,
>
> This patch makes the DeadArgElimination IPO pass treat any return
> value of any function with a 'returned' argument as live even if there
> are no uses. This is meant to allow the clang patch committed as
> revision r184205 (and subsequent minor fixes) to be recommitted after
> being reverted in revision r184205 due to broken builds on ARM when
> compiling with LTO.
>

This does conflict with the theoretical separation of concerns between
optimizer and codegen in LLVM though. This patch does not promote
subsequent mid-level optimization opportunities; treating values as live
when they are actually unused may actually obscure other mid-level
optimization opportunities.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130623/f23ece16/attachment.html>


More information about the llvm-commits mailing list