]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add SSA config options useAvg and useHmul
authorRichard Musiol <mail@richard-musiol.de>
Thu, 8 Mar 2018 23:06:33 +0000 (00:06 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 30 Mar 2018 21:34:26 +0000 (21:34 +0000)
commita9ba3e30acf004a57fbc1288d5cea6bae74d06e8
treefd4fb239422e43e5f9baf0524658e5288f9ca994
parent80e69220c8274223b98247b879df3c57b0dbc476
cmd/compile: add SSA config options useAvg and useHmul

This commit allows architectures to disable optimizations that need the
Avg* and Hmul* operations.

WebAssembly has no such operations, so using them as an optimization
but then having to emulate them with multiple instructions makes no
sense, especially since the WebAssembly compiler may do the same
optimizations internally.

Updates #18892

Change-Id: If57b59e3235482a9e0ec334a7312b3e3b5fc2b61
Reviewed-on: https://go-review.googlesource.com/103256
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go