cmd/compile/internal/ssa: move Op to op package
This change makes an op package with the Op type, the op definitions, and
supporting types. It exports the names of the types and fields to make that
possible.
This CL adds name stutter just like the block one did. We'll want to fix
that in a later CL. Unfortunately it's not as easy as just removing the
op prefix because if we removed the Op in op.Op386ORL for instance the name
op.386ORL would start with a digit.
For #80409
[git-generate]
cd src/cmd/compile/internal/ssa
rf "mv AuxType_ AuxTypeNone Op OpInvalid OpInfo OutputInfo RegInfo OpcodeTable SymEffect SymRead RegMask InputInfo OutputInfo Register ./ssaop"
cd ssaop
rf '
mv AuxType_ AuxType
mv regalloc.go regmask.go
rm regmask.go:/Register allocation/-0,/TODO: maybe we should/+0
'
cd ../_gen
rf 'sub splitPhase var splitPhase = phase1Op'
sed 's/= Op/= ssaop.Op/g' -i *.rules
sed 's/\[Op/\[ssaop.Op/g' -i *.rules
# Update and re-run simdgen
cd ../../../../../simd/archsimd/_gen
sed -i 's/^var splitPhase = .*$/var splitPhase = phase1Op/' \
simdgen/main.go wasmgen/main.go tmplgen/main.go
sed 's/OpARM64LessThanU/ssaop.OpARM64LessThanU/g' -i simdgen/ops/ShiftRotate/go_arm64.yaml
go run . -tmplgen -simdgen -wasmgen
Change-Id: I25911b07dabad30603f92d105538a4ba6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/803781
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attribution license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.