[PATCH] D17108: [PGO] Add another interface for annotateValueSite
Rong Xu via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 22:20:30 PST 2016
That's exactly what I'm doing. I will stop at the first indirect-call
target that not promotable. In that case, if the hottest one is the
external and second hottest one is intra-module. I will not promote
either one.
The problem the patch to solve is: the first one (hottest) is
promoted, while the second one is external. I want to write the
vauledata (minus the first one) back to the metadata.
-Rong
On Thu, Feb 11, 2016 at 9:46 PM, Xinliang David Li <davidxl at google.com> wrote:
> On Thu, Feb 11, 2016 at 9:05 AM, Rong Xu <xur at google.com> wrote:
>> xur added a comment.
>>
>> my indirect-call promotion implementation supports multiple targets (specified the by an option) for a single callsite and the transformation pass can be called multiple times. The promotion stops at the first non-promoted direct target (as it's sorted on the count).
>>
>> For example, for a callsite with the the following valuedata {<func1, 100> <func2, 80> <func3,10>}, after we promote func1 and cannot promote func2, I will attach {<func2, 80> <func3, 10>} to the indirect-call instruction.
>>
>
> What if the hottest callee is external, but the second hottest can be
> resolved intra-module? Promoting such site can lead to sub-optimal
> transformation overall. I think it is better to delay promotion
> transformation (in thinLTO mode) until after importing occurs.
>
> David
>
>
>>
>> http://reviews.llvm.org/D17108
>>
>>
>>
More information about the llvm-commits
mailing list