]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/internal/ssa: handle commutative operations in cse
authorAlexandru Moșoi <mosoi@google.com>
Mon, 22 Feb 2016 10:19:15 +0000 (11:19 +0100)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Mon, 22 Feb 2016 16:52:05 +0000 (16:52 +0000)
commit88c1ef5b450a9cb50ee412b0240e135a74e64517
treee5246c3f8cfdad553babd8f9ae931be4dde0784e
parentb86cafc7dced537165a7cda61b90feae44796055
[dev.ssa] cmd/compile/internal/ssa: handle commutative operations in cse

* If a operation is commutative order the parameters
in a canonical way.

Size of pkg/tool/linux_amd64/* excluding compile:
before: 95882288
 after: 95868152
change: 14136 ~0.015%

I tried something similar with Leq and Geq, but the results were
not great because it confuses the 'lowered cse' pass too much
which can no longer remove redundant comparisons from IsInBounds.

Change-Id: I2f928663a11320bfc51c7fa47e384b7411c420ba
Reviewed-on: https://go-review.googlesource.com/19727
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/ssa/cse.go
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/gen/main.go
src/cmd/compile/internal/ssa/op.go
src/cmd/compile/internal/ssa/opGen.go