sectionLi, David Xinliang, Raksit Ashok, and Robert Hundt. “Lightweight Feedback-Directed Cross-Module Optimization.” Proceedings of the 8th Annual IEEE/ACM International Symposium on Code Generation and Optimization, ACM, April 24, 2010, 53–61. https://doi.org/10.1145/1772954.1772964. [264affb8]
- Two most important IPO passes are function inlining and indirect function call promotion
-
Basically:
- We want to have a smarter way of combining things without making fat .o files
- We can use FDO analysis to determine which functions are hot and worth inlining or promoting
- In order to do so, we can use a greedy algorithm to generate families, which help link these together
- We push linking earlier by using the profiled data
-
Profile data is augmented FDO data, so
- After training run is done, the in-memory info contains a callgraph, using a greedy clustering algorithm to decide on "friends"
- afterwards, we have a standard FDO data (raw counts of how many times each branch was taken), and also module grouping decisions
- In order to make this workable for Buck / Blaze / Bazel, an auxillery file needs to get shipped so the build system knows which sources to include, even when they're not strictly dependant, as a form of dynamic dependency injection
- Predacessor to LTO (and ThinLTO)
- lists.llvm.org/pipermail/llvm-dev/2019-September/135393.html
1. Discussion
1. Discussion
- Coming from FDO baseline is a bit specious
- What is a translation unit here?