]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: speed up dom checking in cse
authorTodd Neal <todd@tneal.org>
Thu, 14 Apr 2016 23:09:57 +0000 (19:09 -0400)
committerTodd Neal <todd@tneal.org>
Fri, 15 Apr 2016 00:30:39 +0000 (00:30 +0000)
commit77d374940e87935a2cc46a60591ec8213003e99a
tree8214d184501797b7e4b03b4045693c3d199382f7
parentd0e8d3a7ae2194b1753bc4e419d5f00aa2d5cb86
cmd/compile: speed up dom checking in cse

Process a slice of equivalent values by setting replaced values to nil
instead of removing them from the slice to eliminate copying.  Also take
advantage of the entry number sort to break early once we reach a value
in a block that is not dominated.

For the code in issue #15112:

Before:
real    0m52.603s
user    0m56.957s
sys     0m1.213s

After:
real    0m22.048s
user    0m26.445s
sys     0m0.939s

Updates #15112

Change-Id: I06d9e1e1f1ad85d7fa196c5d51f0dc163907376d
Reviewed-on: https://go-review.googlesource.com/22068
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/cse.go