]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: combine load + op on AMD64
authorIlya Tocar <ilya.tocar@intel.com>
Fri, 10 Feb 2017 19:17:20 +0000 (13:17 -0600)
committerIlya Tocar <ilya.tocar@intel.com>
Fri, 17 Feb 2017 22:21:49 +0000 (22:21 +0000)
commit21c71d77887733c02a7ae31b65b1b12041485ee5
treeec5133e61c3754ef4a3a05f0dc1f65d235e4bb0a
parenta9292b833bdc8d95f738db20a1fc7bcffc0b33d2
cmd/compile/internal/ssa: combine load + op on AMD64

On AMD64 Most operation can have one operand in memory.
Combine load and dependand operation into one new operation,
where possible. I've seen no significant performance changes on go1,
but this allows to remove ~1.8kb code from go tool. And in math package
I see e. g.:

Remainder-6            70.0ns ± 0%   64.6ns ± 0%   -7.76%  (p=0.000 n=9+1
Change-Id: I88b8602b1d55da8ba548a34eb7da4b25d59a297e
Reviewed-on: https://go-review.googlesource.com/36793
Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/amd64/ssa.go
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/AMD64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteAMD64.go