]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: reenable phielim during rewrite
authorAlexandru Moșoi <mosoi@google.com>
Thu, 21 Apr 2016 08:11:33 +0000 (10:11 +0200)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Fri, 22 Apr 2016 17:22:37 +0000 (17:22 +0000)
commit7879e9193b39e6455ae03f2baace9c41f6393ee4
treebcb30eba9bff5a9b2fda1ace4be01832654e3f73
parentcaef4496fcdaca8dc5b86f60b07760e5434ca1f3
cmd/compile: reenable phielim during rewrite

Remove the "optimization" that was causing the issue.

For the following code the "optimization" was
converting v to (OpCopy x) which is wrong because
x doesn't dominate v.

b1:
    y = ...
    First .. b3
b2:
   x = ...
   Goto b3
b3:
   v = phi x y
   ... use v ...

That "optimization" is likely no longer needed because
we now have a second opt pass with a dce in between
which removes blocks of type First.

For pkg/tools/linux_amd64/* the binary size drops
from 82142886 to 82060034.

Change-Id: I10428abbd8b32c5ca66fec3da2e6f3686dddbe31
Reviewed-on: https://go-review.googlesource.com/22312
Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/phielim.go
src/cmd/compile/internal/ssa/rewrite.go