]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: allocate the flag register in a separate pass
authorKeith Randall <khr@golang.org>
Wed, 9 Dec 2015 23:58:18 +0000 (15:58 -0800)
committerKeith Randall <khr@golang.org>
Fri, 11 Dec 2015 21:08:15 +0000 (21:08 +0000)
commitc140df03267ab2e73ffd076002811aaa00fdc80e
treedffa2bec2304a31c1be5259506abb8fc5d453a41
parent09ffa0c4c772ff119d42820a8d90aba8b481397c
[dev.ssa] cmd/compile: allocate the flag register in a separate pass

Spilling/restoring flag values is a pain to do during regalloc.
Instead, allocate the flag register in a separate pass.  Regalloc then
operates normally on any flag recomputation instructions.

Change-Id: Ia1c3d9e6eff678861193093c0b48a00f90e4156b
Reviewed-on: https://go-review.googlesource.com/17694
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/compile.go
src/cmd/compile/internal/ssa/flagalloc.go [new file with mode: 0644]
src/cmd/compile/internal/ssa/func_test.go
src/cmd/compile/internal/ssa/regalloc.go
src/cmd/compile/internal/ssa/regalloc_test.go
src/cmd/compile/internal/ssa/value.go