[llvm-commits] [llvm] r152556 - in /llvm/trunk: lib/Transforms/IPO/Inliner.cpp test/Transforms/Inline/inline_constprop.ll

Chandler Carruth chandlerc at gmail.com
Fri Mar 16 16:31:11 PDT 2012


I haven't thought deeply about the example you gave yet, or exactly what
will / won't be transformed here because...

On Fri, Mar 16, 2012 at 4:24 PM, Chris Lattner <clattner at apple.com> wrote:

> In my opinion, the right fix for this is to prevent the inlined code from
> being un-constant-folded.  When substituting in the argument into the
> cloned body, can't we recursively simplify things from the def through the
> uses, instead of one level up from the use?


... I completely agree. I almost did this, but had a specific reason to
avoid this: compile time cost. That said, my profiling says we spend very
little time actually doing the inlining, it's all in cleaning up the
post-inlined code, so this is much less scary to me now. Having also read
more of the actual inline operation, I also think the compile time impact
will be much smaller than I imagined originally.

I'll try it out, it's definitely cleaner. I'll followup here if something
goes awry with a more detailed analysis. Thanks for the review!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120316/5969aa65/attachment.html>


More information about the llvm-commits mailing list