]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: detect rewrite loops of length > 1
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 10 Aug 2015 21:01:04 +0000 (14:01 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 10 Aug 2015 21:14:17 +0000 (21:14 +0000)
commitbaf2c3ec4ade20b3a56022983d20373ea9ea49b7
tree3646af42a6e09f3b3bcb0aa8db2438a3f0229210
parente98edc88c9d8453a22bfe3753d0f49510de0cf83
[dev.ssa] cmd/compile: detect rewrite loops of length > 1

Use a version of Floyd's cycle finding algorithm,
but advance by 1 and 1/2 steps per cycle rather
than by 1 and 2. It is simpler and should be cheaper
in the normal, acyclic case.

This should fix the 386 and arm builds,
which are currently hung.

Change-Id: If8bd443011b28a5ecb004a549239991d3dfc862b
Reviewed-on: https://go-review.googlesource.com/13473
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/rewrite.go