[PATCH] D28966: [PGO] Memory intrinsic calls optimization based on profiled size

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 11:29:36 PST 2017


On Wed, Mar 8, 2017 at 11:24 AM, Xinliang David Li <davidxl at google.com>
wrote:

>
>
> On Wed, Mar 8, 2017 at 11:11 AM, Rong Xu via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> xur added a comment.
>>
>> In https://reviews.llvm.org/D28966#694902, @davidxl wrote:
>>
>> > The optimization pass should be split into two phases as IC promotion.
>> The annotation part should probably  be merged with the instrumentation
>> patch. The transformation patch should be done in the same pass as
>> IndirectCallPromotion.
>>
>>
>> Is there a good reason for doing the transformation late?  Here I don't
>> do the annotation and instead, I do the transformation directly in the same
>> pass. The main reason we have annotations in indirect-call-promotion is we
>> need to call it late (in LTO or ThinLTO). Another reason I'm reluctant to
>> use annotation is that we need to maintain/update it (for inline and
>> unroll, for example).
>>
>
> Unlike the indirect call promotion, which enables more inlining, stringOp
> value prof transformation can lead to increased function body size that
> negatively affect inlining decisions.
>
> This is true. But the profile we collect is before inline.  The count
values does not have context information. The only thing we can do is to
scale down based on the edge count.

This also required a separated pass -- we don't have this for indirect-call
promotion either (the LTO part of the ICP is different).


> David
>
>
>>
>> -Rong
>>
>>
>> https://reviews.llvm.org/D28966
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170308/4908318d/attachment.html>


More information about the llvm-commits mailing list