From 87d6a9ff920e55b72ac7f35a85fcf6e448e2cbd7 Mon Sep 17 00:00:00 2001 From: hopehook Date: Wed, 17 Aug 2022 17:02:06 +0800 Subject: [PATCH] cmd/compile: gofmt -w -s Change-Id: I4dad103d23121a21b04800ec157487fdf79f89a6 Reviewed-on: https://go-review.googlesource.com/c/go/+/424398 Run-TryBot: hopehook Reviewed-by: Robert Griesemer Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot --- src/cmd/compile/internal/base/hashdebug.go | 26 +++++++++++++--------- src/cmd/compile/internal/ssa/func.go | 4 +++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/cmd/compile/internal/base/hashdebug.go b/src/cmd/compile/internal/base/hashdebug.go index ca2e8a2420..0a8e88f26c 100644 --- a/src/cmd/compile/internal/base/hashdebug.go +++ b/src/cmd/compile/internal/base/hashdebug.go @@ -32,12 +32,15 @@ var hd HashDebug // DebugHashMatch reports whether environment variable GOSSAHASH // // 1. is empty (this is a special more-quickly implemented case of 3) +// // 2. is "y" or "Y" +// // 3. is a suffix of the sha1 hash of name +// // 4. OR -// if evname(i) is a suffix of the sha1 hash of name -// where evname(i)=fmt.Sprintf("GOSSAHASH%d", i), -// for 0<=i +// gossahash -- +// +// for example: GOMAXPROCS=1 gossahash -- ./all.bash // -// for example: GOMAXPROCS=1 gossahash -- ./all.bash // 6. gossahash should return a single function whose miscompilation // causes the problem, and you can focus on that. -// func DebugHashMatch(pkgAndName string) bool { return hd.DebugHashMatch(pkgAndName) } diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go index d572b02c5f..a8eb74efdb 100644 --- a/src/cmd/compile/internal/ssa/func.go +++ b/src/cmd/compile/internal/ssa/func.go @@ -809,7 +809,9 @@ func (f *Func) invalidateCFG() { } // DebugHashMatch returns -// base.DebugHashMatch(this function's package.name) +// +// base.DebugHashMatch(this function's package.name) +// // for use in bug isolation. The return value is true unless // environment variable GOSSAHASH is set, in which case "it depends". // See [base.DebugHashMatch] for more information. -- 2.50.0