]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: update GOSSAFUNC doc for printing CFG
authorJunyang Shao <shaojunyang@google.com>
Thu, 27 Mar 2025 20:46:33 +0000 (20:46 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 27 Mar 2025 22:39:38 +0000 (15:39 -0700)
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>
src/cmd/compile/internal/ssa/README.md

index 2c602f160c556794b50348add9e8016006974dc5..8184f9c002a97dbc567f074de242ce714b7135ed 100644 (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: