OptView2 - Helping the Compiler Generate Better Code
summary
OptView2 surfaces compiler optimization remarks from Clang/LLVM as actionable HTML, focusing on failures (not internal logs), splitting large runs, and showing hotness and inlining context so you can target real bottlenecks. About half the examples are missed optimizations caused by aliasing: concrete fixes demonstrated include marking pointers restrict, passing small values by value, or using attributes like pure/const/noescape to stop loads “clobbered by store/call” and enable hoisting or vectorization, with before/after assembly and measurable speedups.
AI-written summary · about
chapters (12)
- 0:00Start
- 5:21opt-viewer additions over -Rpass
- 7:13Great work, but
- 9:21Target Developers, Not Compiler Authors
- 12:46Inlining
- 14:57"Clobbered by store"
- 23:05"Clobbered by call"
- 32:27"Failed to move load with loop invariant address"
- 36:26Cheat Sheet
- 36:53GCC work
- 38:51Decorations across compilers
- 46:42Bottom line
related talks
58mOptimization Remarks - "Remarks Helping the Compiler Generate Better Code"
52mUnderstanding Compiler Optimization
28mCode optimization tips and tricks
01h 04m“Understanding Optimizers: Helping the Compiler Help You”
15mNot So Fast: Understanding and Mitigating Negative Impacts of Compiler Optimizations on Code Reuse G
58mC++ Insights: See your source code with the eyes of a compiler
01h 04mC++ Insights: Peek behind the curtains of your C++ compiler
19mExploiting Undefined Behavior in C/C++ Programs for Optimization: A Study on the(…)
