Follow along for https://medium.com/a-journey-with-go/go-overview-of-the-compiler-4e5a153ca889
Set enviornmental variable for GOSSAFUNC
C:\Go\projects\overview>set GOSSAFUNC=maincls
Contents of overview.go
package main
func main() {
a := 1
b := 2
if true {
add(a, b)
}
}
func add(a, b int) {
println(a + b)
}
Build overview.go
go build -gcflags -S overview.go
- https://docs.google.com/document/d/1szwabPJJc4J-igUZU4ZKprOrNRNJug2JPD8OYi3i1K0/edit
- https://pp.ipd.kit.edu/uploads/publikationen/braun13cc.pdf
- https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.8.1979&rep=rep1&type=pdf
- https://dl.acm.org/doi/10.1145/115372.115320
- https://gcc.gnu.org/onlinedocs/gccint/SSA.html