Overview
Explore the advancements in Go's machine-code generation over a two-year period in this 35-minute conference talk from GopherCon 2017. Delve into the implementation of Static Single Assignment (SSA) representation and its role in enabling a wide range of new optimizations. Gain insights into the compiler's performance across different architectures, including amd64 and arm. Learn about key optimization algorithms such as Common Subexpression Elimination, Dead Store Elimination, and Bounds Check Elimination. Discover how rewrite rules contribute to compiler improvements and simplify porting to new architectures. Get ready for an in-depth look at Go's compiler internals, with some assembly knowledge recommended.
Syllabus
Generating better machine code with SSA
Timeline
amd64 - launched in Go 1.7
Compiler speed
The amd64 compiler is 10% slower.
The arm compiler is 10% faster!
Syntax tree
CFG - Control Flow Graph
SSA enables fast, accurate optimization algorithms for
Common Subexpression Elimination
Dead Store Elimination
Bounds Check Elimination
Rewrite rules can get pretty complicated
Rewrite rules make new ports easy!
Taught by
Gopher Academy