-
David Chase authored
The -d compiler flag can also specify ssa phase and flag, for example -d=ssa/generic_cse/time,ssa/generic_cse/stats Spaces in the phase names can be specified with an underscore. Flags currently parsed (not necessarily recognized by the phases yet) are: on, off, mem, time, debug, stats, and test On, off and time are handled in the harness, debug, stats, and test are interpreted by the phase itself. The pass is now attached to the Func being compiled, and a new method logStats(key, ...value) on *Func to encourage a semi-standardized format for that output. Output fields are separated by tabs to ease digestion by awk and spreadsheets. For example, if f.pass.stats > 0 { f.logStat("CSE REWRITES", rewrites) } Change-Id: I16db2b5af64c50ca9a47efeb51d961147a903abc Reviewed-on: https://go-review.googlesource.com/19885Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Todd Neal <todd@tneal.org>
378a8636