LLVM Optimization Remarks
summary
A practical tour of optimization remarks shows a working toolchain: use opt-viewer (HTML output, Compiler Explorer panel) to turn Clang’s YAML logs into line‑annotated reports; about half the examples reproduce missed optimizations and many yield large wins. Most failures trace to alias or escape analysis — e.g. clobbered by store and pointer escape — and fixes include restrict, copying to locals, or attributes like pure/const/noescape. Opt‑viewer works but is memory heavy; examples are concrete and immediately actionable.
AI-written summary · about
chapters (20)
- 0:00Introduction to Remarks
- 2:03Tools for Visualization
- 4:22Configuration and Features
- 7:15Modernizing the Workflow
- 9:42Remarks in Compiler Explorer
- 10:34Inlining Analysis
- 13:07Aliasing Issues
- 17:12Strict Aliasing
- 19:11Const misconceptions
- 20:53Pointer Escape
- 23:46Mitigating Escape
- 27:46Limitations and LTO
- 30:10Loop Invariants
- 34:02Interpreting Clang Output
- 36:42LTO Building Hacks
- 39:24GCC Remark Support
- 41:00Cross-Compiler Strategies
- 42:59Rust and Carbon
- 45:22Performance Impact
- 48:20Future and Conclusion
related talks
01h 50mUnderstanding Compiler Optimization
08mOn "simple" Optimizations
13mKeep your code sane with clang-tidy
01h 03mUnlocking the value of C++20
39mDemystifying LLVM: Writing Your First Compiler - The Good, The Bad, The Ugly
56mPractical C++17
01h 03mto pass and return, the story of functions, values and compilers
54mClang Static Analysis
