The Magic Behind Optimizing Compilers: Static Program Analysis
summary
Shows how static analyses are actually implemented using Clang/LLVM IR, demoing constant propagation and a call‑site replacer pass that generates and rewrites LLVM instructions. Explains the IDE/exploded supergraph technique, gives the worst‑case runtime/space bounds (n·D^2 and n·n·D) and why pointers/aliasing break distributive solutions, describes using restrict and noexcept/constexpr to help optimization, and points to a working GitHub project (phaser) with real implementations and tradeoffs.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 0:21Who is Philipp Schubert
- 3:11Applications and Techniques
- 5:21How does it work
- 6:17Bug detection
- 7:57Dataflow analysis
- 10:07Constant propagation example
- 15:30Static program analysis in LLVM
- 18:49IR inspection in LLVM
- 22:21LLVM code inspection
- 24:22Is LLVM too good
- 26:57LLVM in IDE
- 32:41Compilers vs Static Analysis
- 35:15Static Analysis Challenges
- 39:35How to Write an Analysis
- 41:56How to Perform an Optimization
- 46:15Compilers Need Your Help
- 47:38Does It Help
- 49:37No Except
- 52:13Conclusions
- 53:22Example
- 54:50Conclusion








