[PATCH] D22368: Replace hot-callsite based heuristic to use its own threshold parameter instead of share inline-hint parameter

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 17:12:55 PDT 2016


On Tue, Jul 19, 2016 at 1:29 PM, Xinliang David Li <davidxl at google.com>
wrote:

>
>
> On Tue, Jul 19, 2016 at 1:26 PM, Dehao Chen <danielcdh at gmail.com> wrote:
>
>> danielcdh added a comment.
>>
>> In https://reviews.llvm.org/D22368#488605, @davidxl wrote:
>>
>> > should we have a fixed cutoff threshold, or make it adaptive to the
>> hotness ? Or more generally, make it part of the global speedup analysis
>> (the larger the global speedup, the larger the speedup) -- which we will
>> soon have?
>>
>
>
> I will let Easwaran to chime in.
>
>>
>>
>> I agree. But for now, the PSI interface only give use boolean value for
>> hot/cold inquiry. How about we have this fixed cutoff in first, later when
>> global speedup analysis is ready, we use the speedup as parameter to set
>> the threshold?
>>
>> > Another thing: PGO and autoFDO should reduce overall text size compared
>> with O2 build, so we should also do the opposite -- if the caller has zero
>> count (non samples with autoFDO), the threshold should be reduced.
>>
>>
>> Added cold callsite heuristic
>
>
> Can you provide some size measurement with this new change?
>

I've tested the binary size with this change on internal benchmarks.
Overall, AutoFDO text section size is 1% smaller than O2 because of
ColdCallee Heuristic, which fulfills most of the ColdCallsite heuristic
thus ColdCallsite does not change text size much. So I think it should be
OK to remove the ColdCallsite heuristic.

If we want smaller text size, we simply need to tune down the ColdThreshold.

Dehao


>
> David
>
>
>
>> .
>>
>>
>> https://reviews.llvm.org/D22368
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/13559530/attachment.html>


More information about the llvm-commits mailing list