~/talk

Understanding Compiler Optimization

Talkat DevConf.CZ 2019 · 2019-01-25..01-27· [compilers-and-language-design]
links:none on file
links:none on file
slides:none on file

Explains how GCC turns source into tokens, AST, GIMPLE and SSA and then runs roughly 200–250 optimization passes so the optimizer actually rewrites code; shows using GCC’s opt-record JSON (and an up-mark script) to annotate source with which optimizations ran or were rejected; demonstrates that adding a builtin_unreachable or splitting out code enables tail call optimization, that PGO guides heavy optimizations, and that vectorization requires restrict/no-alias hints (AVX examples) and sometimes manual rewrites to work.

AI-written summary · about

  1. 0:00Start
  2. 2:40The Optimizer
  3. 3:47Tokenization
  4. 5:07Abstract Syntax Tree
  5. 6:04Basic Blocks
  6. 13:11Versions
  7. 45:34Built-In Unreachable
  8. 46:58Vectorization
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.