[dev.ssa] cmd/compile: detect rewrite loops of length > 1
[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 <8c99c3a9284e493be632950b84cd789d08ed3e9d@golang.org>

polyverse-security/go,vsekhar/elastic-go,vsekhar/elastic-go,cyberroadie/go,akutz/go,josharian/go,vsekhar/elastic-go,Samurais/go,binarycrusader/go,vanloswang/go,momchil-velikov/go,goodlang/good,josharian/go,goodlang/good,derekmarcotte/go,codestation/go,nawawi/go,goodlang/good,nawawi/go,cyberroadie/go,mwhudson/go,josharian/go,momchil-velikov/go,goodlang/good,codestation/go,nawawi/go,theif519/go,cyberroadie/go,Samurais/go,momchil-velikov/go,suncycheng/go,linux-on-ibm-z/go,binarycrusader/go,goodlang/good,CAFxX/go,CAFxX/go,ImJasonH/go,Samurais/go,4ad/go,4ad/go,ImJasonH/go,cyberroadie/go,goodlang/good,ImJasonH/go,CAFxX/go,linux-on-ibm-z/go,josharian/go,suncycheng/go,Samurais/go,golang/go,linux-on-ibm-z/go,vsekhar/elastic-go,vanloswang/go,codestation/go,theif519/go,CAFxX/go,polyverse-security/go,binarycrusader/go,theif519/go,Cofyc/go,cyberroadie/go,Cofyc/go,4ad/go,ganboing/go-esx,cloudflare/go,golang/go,suncycheng/go,CAFxX/go,nawawi/go,goodlang/good,derekmarcotte/go,suncycheng/go,ImJasonH/go,vanloswang/go,vsekhar/elastic-go,polyverse-security/go,nawawi/go,4ad/go,CAFxX/go,akutz/go,golang/go,ganboing/go-esx,ImJasonH/go,linux-on-ibm-z/go,golang/go,momchil-velikov/go,vanloswang/go,Cofyc/go,cloudflare/go,cloudflare/go,momchil-velikov/go,suncycheng/go,cloudflare/go,miolini/go,4ad/go,miolini/go,josharian/go,golang/go,codestation/go,golang/go,derekmarcotte/go,4ad/go,Cofyc/go,linux-on-ibm-z/go,derekmarcotte/go,polyverse-security/go,golang/go,golang/go,goodlang/good,mwhudson/go,polyverse-security/go,polyverse-security/go,ganboing/go-esx,vanloswang/go,4ad/go,binarycrusader/go,Samurais/go,akutz/go,momchil-velikov/go,theif519/go,binarycrusader/go,cyberroadie/go,cloudflare/go,suncycheng/go,vanloswang/go,CAFxX/go,polyverse-security/go,ganboing/go-esx,cloudflare/go,Cofyc/go,akutz/go,momchil-velikov/go,josharian/go,suncycheng/go,nawawi/go,momchil-velikov/go,mwhudson/go,akutz/go,derekmarcotte/go,Samurais/go,ganboing/go-esx,akutz/go,codestation/go,linux-on-ibm-z/go,4ad/go,akutz/go,derekmarcotte/go,ImJasonH/go,christopher-henderson/Go,codestation/go,cyberroadie/go,ganboing/go-esx,mwhudson/go,cloudflare/go,vsekhar/elastic-go,miolini/go,ganboing/go-esx,theif519/go,miolini/go,miolini/go,cloudflare/go,linux-on-ibm-z/go,Samurais/go,binarycrusader/go,Samurais/go,mwhudson/go,suncycheng/go,ImJasonH/go,vsekhar/elastic-go,vanloswang/go,binarycrusader/go,Cofyc/go,Cofyc/go,josharian/go,vsekhar/elastic-go,mwhudson/go,polyverse-security/go,akutz/go,vanloswang/go,miolini/go,theif519/go,miolini/go,codestation/go,ganboing/go-esx,linux-on-ibm-z/go,theif519/go,codestation/go,miolini/go,cyberroadie/go,derekmarcotte/go,mwhudson/go,josharian/go,theif519/go,mwhudson/go,ImJasonH/go,CAFxX/go,binarycrusader/go,Cofyc/go,nawawi/go,derekmarcotte/go,nawawi/go