1
0
mirror of https://github.com/golang/go synced 2024-11-19 15:54:46 -07:00

cmd/compile/internal/ssa: group dump files alphabetically

Change dump file names to group them alphabetically in directory
listings, in pass run order.

Change-Id: I8070578a5b4a3a7983dcc527ea1cfdb10a6d7d24
Reviewed-on: https://go-review.googlesource.com/83958
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Geoff Berry 2017-12-14 13:35:59 -05:00 committed by Keith Randall
parent 558eeb2d85
commit 75f0ad705f
2 changed files with 2 additions and 1 deletions

View File

@ -673,6 +673,7 @@ var knownFormats = map[string]string{
"int %-12d": "",
"int %-6d": "",
"int %-8o": "",
"int %02d": "",
"int %6d": "",
"int %c": "",
"int %d": "",

View File

@ -123,7 +123,7 @@ var dumpFileSeq int
// output.
func (f *Func) dumpFile(phaseName string) {
dumpFileSeq++
fname := fmt.Sprintf("%s__%s_%d.dump", phaseName, f.Name, dumpFileSeq)
fname := fmt.Sprintf("%s_%02d__%s.dump", f.Name, dumpFileSeq, phaseName)
fname = strings.Replace(fname, " ", "_", -1)
fname = strings.Replace(fname, "/", "_", -1)
fname = strings.Replace(fname, ":", "_", -1)