Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Generating Better Machine Code with SSA

Gopher Academy via YouTube

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

Reviews

Start your review of Generating Better Machine Code with SSA

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.