~/talk

Understanding the Go Compiler

Talkat GopherCon UK 2023 · 2023-08-16..08-18· [go, compilers-and-language-design]
slides:none on file

Covers the Go compiler pipeline for Go 1.20 by compiling a hello world through scanner → parser → AST → type checker → package IR → SSA, then SSA optimizations (inlining, escape analysis, CSE, dead-code elimination, lowering) to architecture-specific assembly, link with the runtime, and produce a runnable binary that performs a kernel write syscall. Shows concrete code-to-IR examples, the textual SSA and lowered assembly outputs, notes where passes run multiple times, and points to go/ssa, compiler READMEs and strace to observe the result.

AI-written summary · about

  1. 0:00Start
  2. 3:09PHASES OF THE GO COMPILER
  3. 7:48SAMPLE SCANNER CASES
  4. 10:13THE PARSER
  5. 15:03SAMPLE PARSER FUNCTIONS
  6. 16:27TYPE CHECKER
  7. 23:17SSA (STATIC SINGLE ASSIGNMENT)
  8. 28:46SSA PASSES
  9. 32:23MACHINE CODE GENERATION
  10. 36:17THE KERNEL AND THE STDOUT
  11. 38:10SUMMARY
  12. 39:28THE ILLUSTRATIONS OF THE TALK
  13. 40:42REFERENCES
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.