Peeking Into Your Compiler
summary
Shows concrete ways to inspect GCC output: run the driver with -v to reproduce cc1/cc1plus invocations, use -E to see preprocessed input, -pipe and -save-temps to keep intermediate files, and -fdump- to get gimple/RTL dumps* (GCC has ~50–70 middle-end passes and historically produced ~192 dump files for one build). Explains LTO internals (WPA then partitioned backend compilations, fat LTO doubles compile time), PGO, NVPTX offload support (GCC 10 AMD/GCN backend), and examples where range/VRP-driven optimizations expose undefined behavior.
AI-written summary · about
chapters (16)
- 0:00Start
- 3:34Code Generator
- 6:30Preprocessor
- 7:30Precompiled Headers
- 10:06Compiled Unit
- 23:21Lto
- 25:59Modes of Lto
- 31:58Inlining
- 36:40How Do You Get the Highest Compile Speed
- 41:11Extensions
- 51:17Pre-Process C Source Code
- 1:03:04Ternary Operator
- 1:05:28Graphical Output
- 1:07:02Optimized Dump
- 1:14:48Vrp Dump
- 1:22:08Overview
related talks
52mUnderstanding Compiler Optimization
01h 04mCompiler Bugs And Bug Compilers
43mDebugging Code Generation in Go
21mGetting the Most Bang out of your Buck with Compilers on POWER
01h 00mJust Enough Assembly for Compiler Explorer
01h 16m“What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”
20mRefined Input, Degraded Output: The Counterintuitive World of Compiler Behavior
54mGCC/Clang Optimizations for Embedded Linux
