[llvm] r200886 - Inliner uses a smaller inline threshold for callees with cold attribute.

Manman Ren manman.ren at gmail.com
Wed Feb 5 15:58:58 PST 2014


On Wed, Feb 5, 2014 at 3:23 PM, Chandler Carruth <chandlerc at google.com>wrote:

>
> On Wed, Feb 5, 2014 at 2:53 PM, Manman Ren <manman.ren at gmail.com> wrote:
>
>> Author: mren
>> Date: Wed Feb  5 16:53:44 2014
>> New Revision: 200886
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=200886&view=rev
>> Log:
>> Inliner uses a smaller inline threshold for callees with cold attribute.
>>
>> Added command line option inlinecold-threshold to set threshold for
>> inlining
>> functions with cold attribute. Listen to the cold attribute when it would
>> decrease the inline threshold.
>>
>
> You've not gotten any discussion about this or presented any benchmark
> numbers for this what-so-ever.
>

I thought it is straight-forward to use a lower threshold for cold
functions and didn't think this patch is going to have a wide & dramatic
impact.

I am not aware of any benchmark in lnt that uses cold attribute. If there
is one, please let me know so I can collect some performance number.

When Diego first introduced the Cold attribute and used it to adjust block
weights, there was no request on benchmark numbers. So I assumed negligible
performance impact for this patch.

Sorry if this caused regressions. The main purpose of this is performance
of instrumentation based PGO.

Manman


> The cold attribute is widely used already and this may have a very
> dramatic impact.
>
I don't think it is really acceptable to just land a patch that could have
> such a far reaching impact without even a decent discussion or some
> benchmark numbers to ensure this doesn't regress things.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140205/a074bb5e/attachment.html>


More information about the llvm-commits mailing list