[llvm-dev] [ThinLTO] Import functions to enable function specialization in ThinLTO

Florian Hahn via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 14 04:39:05 PDT 2021



> On 14 Jul 2021, at 09:38, chuanqi.xcq via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi all,
> 
> Before I sent a mail to ask the opinion to how to import functions to enable function specialization in ThinLTO.
> Maybe the question is too empty or the function specialization pass didn't get checked in at that time. So I didn't get responses.
> 
> Then now, the function specialization passes got checked in and I also made it a version in the downstream.
> So I tried to update my patches. The first patch is to extract the analysis part of function specialization as an analysis pass.
> (https://reviews.llvm.org/D105524).
> 
> And @sjoerd.meijer suggests that it may be better that I ping this thread with more infomation to make us confident we are
> in the right direction.
> 
> Then I updated this one: https://reviews.llvm.org/D105966, which contains the detailed description and numbers.
> Response in this thread or in that review page is fine to me either.
> 


I’d try to summarise the heuristics you propose to add, rather than focusing on the implementation details to start with. I think it might be helpful to motivate a set of heuristics first. You should also be able to collect and provide date on the effectiveness of those heuristics, like the number of additional functions imported, compared to the number of additionally specialised  functions.

Also, the scope/focus on function specialisation seems a bit narrow for substantially increasing the number of imported functions. Do you think the proposed heuristics would also benefit other optimisations, like regular IPSCCP?

Cheers,
Florian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210714/92e3e7de/attachment.html>


More information about the llvm-dev mailing list