]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: fix for bug in cse speed improvements
authorDavid Chase <drchase@google.com>
Mon, 8 Feb 2016 17:07:39 +0000 (12:07 -0500)
committerDavid Chase <drchase@google.com>
Mon, 8 Feb 2016 18:44:03 +0000 (18:44 +0000)
commit58cfa40419f2ef1c58f58015eb8421a5a1b94129
tree3a26e29e671b8979daa57b43baa2e2a157a34ff9
parentbc0792284306ade896db24002a52d00901ce5f69
[dev.ssa] cmd/compile: fix for bug in cse speed improvements

Problem was caused by use of Args[].Aux differences
in early partitioning.  This artificially separated
two equivalent expressions because sort ignores the
Aux field, hence things can end with equal things
separated by unequal things and thus the equal things
are split into more than one partition.  For example:
SliceLen(a), SliceLen(b), SliceLen(a).

Fix: don't use Args[].Aux in initial partitioning.

Left in a debugging flag and some debugging Fprintf's;
not sure if that is house style or not.  We'll probably
want to be more systematic in our naming conventions,
e.g. ssa.cse, ssa.scc, etc.

Change-Id: Ib1412539cc30d91ea542c0ac7b2f9b504108ca7f
Reviewed-on: https://go-review.googlesource.com/19316
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/lex.go
src/cmd/compile/internal/ssa/compile.go
src/cmd/compile/internal/ssa/cse.go