Hello World from Scratch
summary
Starts with a bare C++ hello world and traces every concrete step to a runnable ELF binary: preprocessor -> compiler front/middle/back -> assembler -> linker; shows macros and includes as textual substitution, lexing/parsing into an AST, IR (LLVM) lowering, liveness analysis and graph‑coloring register allocation, instruction selection (macro expansion vs SelectionDAG), scheduling and peephole optimizations, emitting .rodata and .text with relocations, linker resolving puts from libc, and finally the bytes execute and print "hello world".
AI-written summary · about
chapters (12)
- 0:00Introduction to Hello World
- 1:26Hello World in C
- 7:52Compiler overview
- 15:22Front end of compiler
- 29:11Lexing and parsing
- 37:10Semantic analysis
- 40:20Intermediate representation
- 49:19Middle end optimizations
- 58:30Back end compilation
- 1:07:03Register allocation
- 1:15:30Assembling and linking
- 1:19:43Final executable
related talks
59mHello World From Scratch
29mUnderstanding 'Hello World'
01h 00mFrom Program to Process - What Happens After the Compiler
01h 04mThe Bits Between the Bits: How We Get to main()
10mA quick view into a compiler
52mA bird's eye view of a compiler
55mHow Compilers Work: Introduction to LLVM Passes
01h 00mJust Enough Assembly for Compiler Explorer
