Keyboard shortcuts

/ or ⌘/Ctrl K
Find a note
j / k
Next / previous section or linked note
h / l
Collapse or go to parent / expand or enter
e or Alt-click
Read a linked note here
o
Open focused note on its own
g g / G
First / last section or linked note
g h / g a
Home / all notes
g b / g t
Backlinks / table of contents
t
Cycle System, Light, Dark
? / Esc
Show / close this reference

Search: ↑/↓ or Ctrl N/P, Enter to open. Shortcuts pause while typing.

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:

    1. We want to have a smarter way of combining things without making fat .o files
    2. We can use FDO analysis to determine which functions are hot and worth inlining or promoting
    3. 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

  • Coming from FDO baseline is a bit specious
  • What is a translation unit here?