Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1003 Bytes

README.md

File metadata and controls

42 lines (29 loc) · 1003 Bytes

SSA

A tool that prints the SSA representation of packages and/or functions.

Usage

Install the tool:

go install github.com/stealthrocket/ssa@latest

Print a summary of members in a package

ssa path/to/go/package

Print the SSA form of one or more functions/methods in a package:

ssa path/to/go/package Function SomeOtherFunction SomeOtherMethod

Notes

This prints the golang.org/x/tools/go/ssa representation, which is not the same as the SSA form that the Go compiler uses (cmd/compile/internal/ssa).

See:

A related tool is x/tools/cmd/callgraph, which prints the callgraph for a set of packages. It uses the same SSA form for its analysis.

go install golang.org/x/tools/cmd/callgraph@latest