Repository navigation
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
I noticed it was somewhat difficult to read the ssa/help output:
$ go tool compile -d ssa/help
compile: GcFlag -d=ssa/<phase>/<flag>[=<value>]|[:<function_name>]
<phase> is one of:
check, all, build, intrinsics, early_phielim, early_copyelim
early_deadcode, short_circuit, decompose_user, opt, zero_arg_cse
opt_deadcode, generic_cse, phiopt, nilcheckelim, prove, loopbce
decompose_builtin, dec, late_opt, generic_deadcode, check_bce
writebarrier, fuse, dse, insert_resched_checks, tighten, lower
lowered_cse, lowered_deadcode, checkLower, late_phielim, late_copyelim
phi_tighten, late_deadcode, critical, likelyadjust, layout, schedule
late_nilcheck, flagalloc, regalloc, stackframe, trim
<flag> is one of on, off, debug, mem, time, test, stats, dump
<value> defaults to 1
<function_name> is required for "dump", specifies name of function to dump after <phase>
Except for dump, output is directed to standard out; dump appears in a file.
Phase "all" supports flags "time", "mem", and "dump".
Phases "intrinsics" supports flags "on", "off", and "debug".
Interpretation of the "debug" value depends on the phase.
Dump files are named <phase>__<function_name>_<seq>.dump.
With a few tweaks here and there it looks more pleasing to the eye:
$ go tool compile -d ssa/help
compile: usage: -d=ssa/<phase>/<flag>[=<value>|<function_name>]
<phase> is one of:
check, all, build, intrinsics, early_phielim, early_copyelim, early_deadcode
short_circuit, decompose_user, opt, zero_arg_cse, opt_deadcode, generic_cse
phiopt, nilcheckelim, prove, loopbce, decompose_builtin, dec, late_opt
generic_deadcode, check_bce, writebarrier, fuse, dse, insert_resched_checks
tighten, lower, lowered_cse, lowered_deadcode, checkLower, late_phielim
late_copyelim, phi_tighten, late_deadcode, critical, likelyadjust, layout
schedule, late_nilcheck, flagalloc, regalloc, stackframe, trim
<flag> is one of on, off, debug, mem, time, test, stats, dump.
Phase all supports flags time, mem, and dump.
Phase intrinsics supports flags on, off, and debug.
<value> defaults to 1.
<function_name> is required for dump, specifies name of function to dump after <phase>.
Except for dump, output is directed to standard out; dump appears in a file.
Dump files are named <phase>__<function_name>_<seq>.dump.
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Activity
gopherbot commentedon May 12, 2017
CL https://golang.org/cl/41470 mentions this issue.
[-]Improve the help message of go tool compile -d ssa/help[/-][+]cmd/compile: improve the help message of go tool compile -d ssa/help[/+]bradfitz commentedon May 13, 2017
I consider this documentation and fine for Go 1.9 if you can find a reviewer. Probably @randall77 or @josharian.
josharian commentedon May 14, 2017
I'll review. Please consider adding a few examples of commonly used flags.
gopherbot commentedon Apr 29, 2018
Change https://golang.org/cl/110062 mentions this issue:
cmd/compile: better formatting for ssa phases options doc