]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: make math/bits.RotateLeft* an intrinsic on amd64
authorAndrew Bonventre <andybons@golang.org>
Thu, 30 Aug 2018 21:47:04 +0000 (15:47 -0600)
committerAndrew Bonventre <andybons@golang.org>
Thu, 30 Aug 2018 22:48:28 +0000 (22:48 +0000)
commit5ac247674884a93f3a7630649ee00923724e7961
tree60a2e228717199b480e5c95bda781e036821f75f
parent8201b92aae7ba51ed2e2645c1f7815bfe845db72
cmd/compile: make math/bits.RotateLeft* an intrinsic on amd64

Previously, pattern matching was good enough to achieve good performance
for the RotateLeft* functions, but the inlining cost for them was much
too high. Make RotateLeft* intrinsic on amd64 as a stop-gap for now to
reduce inlining costs.

This should be done (or at least looked at) for other architectures
as well.

Updates golang/go#17566

Change-Id: I6a106ff00b6c4e3f490650af3e083ed2be00c819
Reviewed-on: https://go-review.googlesource.com/132435
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
test/inline_math_bits_rotate.go [new file with mode: 0644]