cmd/compile: update GOSSAFUNC doc for printing CFG

Updates #30074

Change-Id: I160124afb65849c624a225d384c35313723f9f30
Reviewed-on: https://go-review.googlesource.com/c/go/+/661415
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Junyang Shao 2025-03-27 20:46:33 +00:00 committed by Gopher Robot
parent a645bc5eb9
commit b17a99d6fc

View File

@ -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: