]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: remove use of Initorder, Offset Node fields for initorder
authorRuss Cox <rsc@golang.org>
Fri, 11 Dec 2020 17:55:14 +0000 (12:55 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 17 Dec 2020 03:50:15 +0000 (03:50 +0000)
commit7fde0d2b507b989cb9a23d6dbae9acaa13328c53
tree5bc2ab491f313435ecb57d64b7e2942de73c8104
parent114af2a04408d0480bb3e9253bf15aae6b7ed23e
[dev.regabi] cmd/compile: remove use of Initorder, Offset Node fields for initorder

The initorder pass is already making heavy use of maps,
and it is concerned with relatively few nodes (only the assignments
in package-level variable declarations). The tracking of init order
for these nodes can be done with another map instead of storing
the bits directly in the Node representations.

This will let us drop Offset_ from AssignStmt and AssignListStmt
and drop Initorder from all nodes.

Passes buildall w/ toolstash -cmp.

Change-Id: I151c64e84670292c2004da4e8e3d0660a88e3df3
Reviewed-on: https://go-review.googlesource.com/c/go/+/277917
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/initorder.go
src/cmd/compile/internal/ir/mini.go
src/cmd/compile/internal/ir/node.go
src/cmd/compile/internal/ir/stmt.go