[PATCH] D93838: [SCCP] Add Function Specialization pass

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 21:16:34 PDT 2021


davidxl added a comment.

In D93838#2770226 <https://reviews.llvm.org/D93838#2770226>, @ChuanqiXu wrote:

> In D93838#2770225 <https://reviews.llvm.org/D93838#2770225>, @davidxl wrote:
>
>> If the function pointer points to a function too large to be inlined,  I expect the benefit of cloning the caller will also be minimal.
>
> It depends on the number of callsites. But for the example in mcf, I agree with you that cloning may be not more beneficial than inlining.
>
>> What I am saying is that for the motivating example in MCF, it may be possible to fix the inliner.
>
> I agree with that if is possible to inline spec_qsort by adjusting the bonus. And what I am saying is function specialization is valuable and important.

If it is valuable and important, definitely go for it :)

My question is other than MCF, do we have other real world app that can benefit from this optimization (that can not be done by inliner)?  I saw omnetpp also improves, do you know where it helps ?  Also with PGO, do we see similar improvement?

Asking these because there are compile time and code size consequences..


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93838/new/

https://reviews.llvm.org/D93838



More information about the llvm-commits mailing list