diff --git a/src/cmd/compile/internal/ssa/README.md b/src/cmd/compile/internal/ssa/README.md index 2c602f160c..8184f9c002 100644 --- a/src/cmd/compile/internal/ssa/README.md +++ b/src/cmd/compile/internal/ssa/README.md @@ -206,6 +206,16 @@ name, e.g. This will match any function named "Foo" within a package whose final suffix is "blah" (e.g. something/blah.Foo, anotherthing/extra/blah.Foo). +The users may also print the Control Flow Graph(CFG) by specifying in +`GOSSAFUNC` value in the following format: + + GOSSAFUNC="$FunctionName:$PassName1,$PassName2,..." go build + +For example, the following command will print SSA with CFGs attached to the +`sccp` and `generic deadcode` pass columns: + + GOSSAFUNC="blah.Foo:sccp,generic deadcode" go build + If non-HTML dumps are needed, append a "+" to the GOSSAFUNC value and dumps will be written to stdout: