[dev.regabi] cmd/compile: add ssa.Aux tag interface for Value.Aux

It's currently hard to automate refactorings around the Value.Aux
field, because we don't have any static typing information for it.
Adding a tag interface will make subsequent CLs easier and safer.

Passes buildall w/ toolstash -cmp.

Updates #42982.

Change-Id: I41ae8e411a66bda3195a0957b60c2fe8a8002893
Reviewed-on: https://go-review.googlesource.com/c/go/+/275756
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Matthew Dempsky 2020-12-07 17:15:44 -08:00
parent 63722da46b
commit 1a98ab0e2d
20 changed files with 80 additions and 57 deletions

View file

@ -275,7 +275,7 @@ func lt2Cmp(isLt bool) types.Cmp {
return types.CMPgt
}
type auxmap map[interface{}]int32
type auxmap map[Aux]int32
func cmpVal(v, w *Value, auxIDs auxmap) types.Cmp {
// Try to order these comparison by cost (cheaper first)