aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/base/hashdebug.go
diff options
context:
space:
mode:
authorthepudds <thepudds1460@gmail.com>2025-06-28 16:53:37 -0400
committert hepudds <thepudds1460@gmail.com>2025-06-30 14:01:43 -0700
commite46d586eddfdd2186d77a5e996bbd6415cfcf2f5 (patch)
tree3716f626bb9739fd23519a49da3869424e76a444 /src/cmd/compile/internal/base/hashdebug.go
parent479b51ee1f78a884a45b517c1e993d91c9774e29 (diff)
downloadgo-e46d586eddfdd2186d77a5e996bbd6415cfcf2f5.tar.xz
cmd/compile/internal/escape: add debug hash for literal allocation optimizations
Several CLs earlier in this stack added optimizations to reduce user allocations by recognizing and taking advantage of literals, including CL 649555, CL 649079, and CL 649035. This CL adds debug hashing of those changes, which enables use of the bisect tool, such as 'bisect -compile=literalalloc go test -run=Foo'. This also allows these optimizations to be manually disabled via '-gcflags=all=-d=literalallochash=n'. Updates #71359 Change-Id: I854f7742a6efa5b17d914932d61a32b2297f0c88 Reviewed-on: https://go-review.googlesource.com/c/go/+/675415 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/compile/internal/base/hashdebug.go')
-rw-r--r--src/cmd/compile/internal/base/hashdebug.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/base/hashdebug.go b/src/cmd/compile/internal/base/hashdebug.go
index c54b6e17aa..fa63deb46a 100644
--- a/src/cmd/compile/internal/base/hashdebug.go
+++ b/src/cmd/compile/internal/base/hashdebug.go
@@ -56,6 +56,7 @@ var hashDebug *HashDebug
var FmaHash *HashDebug // for debugging fused-multiply-add floating point changes
var LoopVarHash *HashDebug // for debugging shared/private loop variable changes
var PGOHash *HashDebug // for debugging PGO optimization decisions
+var LiteralAllocHash *HashDebug // for debugging literal allocation optimizations
var MergeLocalsHash *HashDebug // for debugging local stack slot merging changes
var VariableMakeHash *HashDebug // for debugging variable-sized make optimizations