aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/reflectdata
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2024-08-21 16:17:16 -0400
committerGopher Robot <gobot@golang.org>2024-10-28 21:25:50 +0000
commitcd54b9bae94b36f67869ef174cbb432bc4012183 (patch)
tree95771c1b1e79fb4650dc144d3dae56bdf803ea31 /src/cmd/compile/internal/reflectdata
parent775837f51f03245bcba333094b4b3742f8fbfca3 (diff)
downloadgo-cd54b9bae94b36f67869ef174cbb432bc4012183.tar.xz
internal/runtime/maps: shift optimizations
Masking the shift lets the compiler elide a few instructions for handling a shift of > 63 bits. For #54766. Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest-swissmap Change-Id: I669fe01caa1de1b8521f1f56b6906f3e9066a39b Reviewed-on: https://go-review.googlesource.com/c/go/+/611190 Auto-Submit: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/cmd/compile/internal/reflectdata')
-rw-r--r--src/cmd/compile/internal/reflectdata/map_swiss.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/reflectdata/map_swiss.go b/src/cmd/compile/internal/reflectdata/map_swiss.go
index a76864bdff..38a23908a6 100644
--- a/src/cmd/compile/internal/reflectdata/map_swiss.go
+++ b/src/cmd/compile/internal/reflectdata/map_swiss.go
@@ -148,6 +148,7 @@ func SwissMapType() *types.Type {
// dirLen int
//
// globalDepth uint8
+ // globalShift uint8
// // N.B Padding
//
// clearSeq uint64
@@ -160,6 +161,7 @@ func SwissMapType() *types.Type {
makefield("dirPtr", types.Types[types.TUNSAFEPTR]),
makefield("dirLen", types.Types[types.TINT]),
makefield("globalDepth", types.Types[types.TUINT8]),
+ makefield("globalShift", types.Types[types.TUINT8]),
makefield("clearSeq", types.Types[types.TUINT64]),
}