]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.ssa] cmd/compile/internal/ssa: simplify boolean phis
authorAlexandru Moșoi <mosoi@google.com>
Mon, 29 Feb 2016 18:29:04 +0000 (19:29 +0100)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Tue, 1 Mar 2016 17:56:13 +0000 (17:56 +0000)
commite197f467d51318305439610d44af0e20dae7062f
tree5f68f19c7e102f4718e8fd7cea3fab8a7fa6ccd1
parent1f6e9e36b0aba3d2459c80b2c8e905d9cc57f7ce
[dev.ssa] cmd/compile/internal/ssa: simplify boolean phis

* Decreases the generated code slightly.
* Similar to phiopt pass from gcc, except it only handles
booleans. Handling Eq/Neq had no impact on the generated code.

name       old time/op     new time/op     delta
Template       453ms ± 4%      451ms ± 4%    ~           (p=0.468 n=24+24)
GoTypes        1.55s ± 1%      1.55s ± 2%    ~           (p=0.287 n=24+25)
Compiler       6.53s ± 2%      6.56s ± 1%  +0.46%        (p=0.050 n=23+23)
MakeBash       45.8s ± 2%      45.7s ± 2%    ~           (p=0.866 n=24+25)

name       old text-bytes  new text-bytes  delta
HelloSize       676k ± 0%       676k ± 0%    ~     (all samples are equal)
CmdGoSize      8.07M ± 0%      8.07M ± 0%  -0.03%        (p=0.000 n=25+25)

Change-Id: Ia62477b7554127958a14cb27f85849b095d63663
Reviewed-on: https://go-review.googlesource.com/20090
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/compile.go
src/cmd/compile/internal/ssa/phiopt.go [new file with mode: 0644]
test/phiopt.go [new file with mode: 0644]