[llvm-dev] [RFC] Add a module inliner

Liqiang Tao via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 24 08:57:08 PDT 2021


In my GSoC 2021, my goal is to evaluate the value of different callsite
visiting orderings, which is inspired by paper[1][2]. I've already enabled
doing such an exploration within the constraints of the current SCC inliner
(https://reviews.llvm.org/D104028). Exploring more advanced callsite
orderings is not possible with the current SCC inliner. The current SCC
inliner runs on each SCC in a bottom-up traversal, which means that the
inline order is limited to a bottom-up order.

To address this limitation, I would like to add a module inliner, which
processes all call sites in a given module at a time instead of a given
SCC. This gives us flexibility on the order in which we process call sites.

The module inliner would be disabled by default, to minimize code churn to
the existing codebase and make it easier to remove it. Also, to avoid
unnecessary abstractions, which would complicate the existing codebase,
some code is copied from SCC inliner. Lastly, to foster collaboration, I
would propose landing it in trunk rather than a branch.

Best wishes,

Liqiang Tao

---- [1] Aleksandar Prokopec, Gilles Duboscq, David Leopoldseder, and
Thomas W├╝rthinger. 2019. An optimization-driven incremental inline
substitution algorithm for just-in-time compilers. In Proceedings of the
2019 IEEE/ACM International Symposium on Code Generation and Optimization
(CGO 2019). [2] Dhruva R. Chakrabarti and Shin-Ming Liu. 2006. Inline
Analysis: Beyond Selection Heuristics. In Proceedings of the International
Symposium on Code Generation and Optimization (CGO '06).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210824/5fb2bf54/attachment.html>


More information about the llvm-dev mailing list