]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: regalloc of two address instructions
authorKeith Randall <khr@golang.org>
Thu, 10 Mar 2016 21:05:56 +0000 (13:05 -0800)
committerKeith Randall <khr@golang.org>
Fri, 11 Mar 2016 04:13:07 +0000 (04:13 +0000)
commit369f4f5de554b3754a5b0f3140be15bbe2c82615
tree33bd8a10f8f297ea2338daca8b8309f301d5952a
parent157f069873c0fe2310e628ffd679caffa6e68b4e
cmd/compile: regalloc of two address instructions

x86 has a lot of instructions that require the output to be in the same
register as one of the inputs.  When allocating the output register,
allocate the same register as the input if it is available.

Improves the performance of golang.org/x/crypto/sha3 by
10% (from 6% slower than 1.6 to 4% faster).

Fixes #14745

Change-Id: I4d81785240c9368e4dc75107b45c959d200df8e6
Reviewed-on: https://go-review.googlesource.com/20488
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/gen/main.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/regalloc.go