]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: handle OCONVNOP better in ssa
authorRuss Cox <rsc@golang.org>
Tue, 1 Dec 2020 17:02:16 +0000 (12:02 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 3 Dec 2020 16:22:40 +0000 (16:22 +0000)
commit59b8916d482bdca933885881dff54365432ec9f5
tree7a392f5127bb6a1a4b437724fa30404ba8212032
parent00e572779077737d409ed57194510ec42c520b34
[dev.regabi] cmd/compile: handle OCONVNOP better in ssa

This CL improves handling of OCONVNOP nodes during ssa generation,
so it is not toolstash safe.

An OCONVNOP wrapper is necessary for the "for" condition of
certain compiled range loops, and the boolean evaluator was
not looking through them properly, generating unnecessary
temporaries. That change saved 8k of the (13 MB) go binary.

The other changes just streamline the handling of OCONVNOP
to be more like what OSTMTEXPR will be like. They have no
effect on output size but do tweak the ssa graph a little, which
causes different register decisions and therefore different output.

Change-Id: I9e1dcd413b60944e21554c3e3f2bdc9adcee7634
Reviewed-on: https://go-review.googlesource.com/c/go/+/274598
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/walk.go