]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: make loop finder more aware of irreducible loops
authorDavid Chase <drchase@google.com>
Fri, 28 Apr 2017 20:48:11 +0000 (16:48 -0400)
committerDavid Chase <drchase@google.com>
Thu, 5 Oct 2017 18:49:10 +0000 (18:49 +0000)
commit9e21e9c5cb27e5f2b5acba14efb6bb6f126595cc
tree51167527a921bf25fe00abf5c2326bc0aa4b01b6
parentacdb44765d86a5fd66cbbe24735f7dde658a295f
cmd/compile: make loop finder more aware of irreducible loops

The loop finder doesn't return good information if it
encounters an irreducible loop.  Make a start on improving
this, and set a function-level flag to indicate when there
is such a loop (and the returned information might be flaky).

Use that flag to prevent the loop rotater from getting
confused; the existing code seems to depend on artifacts
of the previous loop-finding algorithm. (There is one
irreducible loop in the go library, in "inflate.go").

Change-Id: If6e26feab38d9b009d2252d556e1470c803bde40
Reviewed-on: https://go-review.googlesource.com/42150
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssa/likelyadjust.go
src/cmd/compile/internal/ssa/looprotate.go