From c39bc22c141bc6990e4e2abf604dcf56669ff779 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Fri, 3 May 2024 13:03:04 -0400 Subject: all: wire up swisstable maps Use the new SwissTable-based map in internal/runtime/maps as the basis for the runtime map when GOEXPERIMENT=swissmap. Integration is complete enough to pass all.bash. Notable missing features: * Race integration / concurrent write detection * Stack-allocated maps * Specialized "fast" map variants * Indirect key / elem For #54766. Cq-Include-Trybots: luci.golang.try:gotip-linux-ppc64_power10,gotip-linux-amd64-longtest-swissmap Change-Id: Ie97b656b6d8e05c0403311ae08fef9f51756a639 Reviewed-on: https://go-review.googlesource.com/c/go/+/594596 Reviewed-by: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- src/cmd/compile/internal/test/inl_test.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/cmd/compile/internal/test') diff --git a/src/cmd/compile/internal/test/inl_test.go b/src/cmd/compile/internal/test/inl_test.go index 5a8a156f02..758479b622 100644 --- a/src/cmd/compile/internal/test/inl_test.go +++ b/src/cmd/compile/internal/test/inl_test.go @@ -39,10 +39,7 @@ func TestIntendedInlining(t *testing.T) { "adjustpointer", "alignDown", "alignUp", - "bucketMask", - "bucketShift", "chanbuf", - "evacuated", "fastlog2", "float64bits", "funcspdelta", @@ -62,9 +59,6 @@ func TestIntendedInlining(t *testing.T) { "stringStructOf", "subtract1", "subtractb", - "tophash", - "(*bmap).keys", - "(*bmap).overflow", "(*waitq).enqueue", "funcInfo.entry", @@ -236,6 +230,15 @@ func TestIntendedInlining(t *testing.T) { }, } + if !goexperiment.SwissMap { + // Maps + want["runtime"] = append(want["runtime"], "bucketMask") + want["runtime"] = append(want["runtime"], "bucketShift") + want["runtime"] = append(want["runtime"], "evacuated") + want["runtime"] = append(want["runtime"], "tophash") + want["runtime"] = append(want["runtime"], "(*bmap).keys") + want["runtime"] = append(want["runtime"], "(*bmap).overflow") + } if runtime.GOARCH != "386" && runtime.GOARCH != "loong64" && runtime.GOARCH != "mips64" && runtime.GOARCH != "mips64le" && runtime.GOARCH != "riscv64" { // nextFreeFast calls sys.TrailingZeros64, which on 386 is implemented in asm and is not inlinable. // We currently don't have midstack inlining so nextFreeFast is also not inlinable on 386. -- cgit v1.3-5-g9baa