Skip to content

commandline tool to view ssa representation in go compiler

License

Notifications You must be signed in to change notification settings

katsusan/ssaview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssaview

tool for hacking the detail of the SSA in Golang compiler.

Usage:

$ go get github.com/Katsusan/ssaview
$ ssaview -f=main -args="-N -l" -h=127.0.0.1 -p=9000 hello.go
$ ssaview -f=main hello.go
$ ssaview hello.go world.go

notes:

There are 49 steps from AST to final assembly code. all define in ssa source.

That is, 53 columns are shown in default. If you want to generate SVG of those 49 steps, please use -f myfunc:x-y,z, in which x, y, z are ssa passes name. for example, -f main:number_lines-early_copyelim,stackfram. ("_" will be replaced by space when parsed)

"sources"
"AST"
"start"
"number lines"      //ssa passes[0]
"early phielim"     //ssa passes[1]
"early copyelim"
...
"stackframe"        //ssa passes[47]
"trim"              //ssa passes[48]
"genssa"            //final assembly

Preview

About

commandline tool to view ssa representation in go compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages