[PATCH] D17108: [PGO] Add another interface for annotateValueSite

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 21:46:39 PST 2016


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