]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: Eval append args after growslice
authorKeith Randall <khr@golang.org>
Mon, 5 Oct 2015 20:48:40 +0000 (13:48 -0700)
committerKeith Randall <khr@golang.org>
Mon, 5 Oct 2015 21:25:48 +0000 (21:25 +0000)
commit9aba7e76f605f7c4fad49886e710152730c34b69
treeea02e2635e1cc40d37c32e4a105e3907977039b7
parent579ccd831fc9c0e4ed05a904bb0ff61e5124c70c
[dev.ssa] cmd/compile: Eval append args after growslice

For appending large types, we want to evaluate the
values being appended after the growslice call, not before.
Evaluating them before leads to phi operations on large types
which confuses the lowering pass.

The order pass has already removed any side-effects from the
values being appended, so it doesn't matter if we do this
last eval before or after the growslice call.

This change fixes a bunch (but not all) of our failed lowerings.

Change-Id: I7c697d4d5275d71b7ef4677b830fd86c52ba03a4
Reviewed-on: https://go-review.googlesource.com/15430
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go