Commit 75f0ad70 authored by Geoff Berry's avatar Geoff Berry Committed by Keith Randall

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/83958Reviewed-by: 's avatarKeith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 558eeb2d
...@@ -673,6 +673,7 @@ var knownFormats = map[string]string{ ...@@ -673,6 +673,7 @@ var knownFormats = map[string]string{
"int %-12d": "", "int %-12d": "",
"int %-6d": "", "int %-6d": "",
"int %-8o": "", "int %-8o": "",
"int %02d": "",
"int %6d": "", "int %6d": "",
"int %c": "", "int %c": "",
"int %d": "", "int %d": "",
......
...@@ -123,7 +123,7 @@ var dumpFileSeq int ...@@ -123,7 +123,7 @@ var dumpFileSeq int
// output. // output.
func (f *Func) dumpFile(phaseName string) { func (f *Func) dumpFile(phaseName string) {
dumpFileSeq++ 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) fname = strings.Replace(fname, "/", "_", -1)
fname = strings.Replace(fname, ":", "_", -1) fname = strings.Replace(fname, ":", "_", -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment