[dev.simd] cmd/compile: adapters for simd

This combines several CLs into a single patch of "glue"
for the generated SIMD extensions.

This glue includes GOEXPERIMENT checks that disable
the creation of user-visible "simd" types and
that disable the registration of "simd" intrinsics.

The simd type checks were changed to work for either
package "simd" or "internal/simd" so that moving that
package won't be quite so fragile.

cmd/compile, internal/simd: glue for adding SIMD extensions to Go
cmd/compile: theft of Cherry's sample SIMD compilation

Change-Id: Id44e2f4bafe74032c26de576a8691b6f7d977e01
Reviewed-on: https://go-review.googlesource.com/c/go/+/675598
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
This commit is contained in:
David Chase 2025-03-31 10:45:23 +11:00
parent 2ef7106881
commit 04b1030ae4
26 changed files with 2196 additions and 675 deletions

View file

@ -0,0 +1,19 @@
// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Placeholder for generated glue to come later
package amd64
import (
"cmd/compile/internal/ssa"
"cmd/compile/internal/ssagen"
)
func ssaGenSIMDValue(s *ssagen.State, v *ssa.Value) bool {
switch v.Op {
default:
return false
}
return true
}