cmd/compile: improve the ssa documentation.

The auxiliary field could be better documented as it appears in a lot of the operands.
This CL documents and points the user to the code for further information.

Change-Id: I34a73af488358c9799e286f3b5ee4b08639ce608
Reviewed-on: https://go-review.googlesource.com/c/go/+/613615
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
sunnymilk 2024-09-16 17:10:51 -07:00 committed by Junyang Shao
parent d1c3f255fd
commit efbf4b0713

View File

@ -46,7 +46,21 @@ above has a `uint8` type, and a constant boolean value will have a `bool` type.
However, certain types don't come from Go and are special; below we will cover
`memory`, the most common of them.
See [value.go](value.go) for more information.
Some operators contain an auxiliary field. The aux fields are usually printed as
enclosed in `[]` or `{}`, and could be the constant op argument, argument type,
etc.
for example:
v13 (?) = Const64 <int> [1]
Here the aux field is the constant op argument, the op is creating a `Const64`
value of 1. One more example:
v17 (361) = Store <mem> {int} v16 v14 v8
Here the aux field is the type of the value being `Store`ed, which is int.
See [value.go](value.go) and `_gen/*Ops.go` for more information.
#### Memory types