]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: use reverse postorder traversal
authorHeschi Kreinick <heschi@google.com>
Thu, 19 Oct 2017 22:59:41 +0000 (18:59 -0400)
committerHeschi Kreinick <heschi@google.com>
Tue, 24 Oct 2017 20:22:05 +0000 (20:22 +0000)
commit73f1a1a1a7f7781c095ef6aebe8b0adf0669d6b2
tree75d85a27411218fc9451db973b3965c64dc4cc4d
parent81ec7256072ed5e20b8827c583193258769aebc0
cmd/compile/internal/ssa: use reverse postorder traversal

Instead of the hand-written control flow analysis in debug info
generation, use a reverse postorder traversal, which is basically the
same thing. It should be slightly faster.

More importantly, the previous version simply gave up in the case of
non-reducible functions, and produced output that caused a later stage
to crash. It turns out that there's a non-reducible function in
compress/flate, so that wasn't a theoretical issue.

With this change, all blocks will be visited, even for non-reducible
functions.

Change-Id: Id47536764ee93203c6b4105a1a3013fe3265aa12
Reviewed-on: https://go-review.googlesource.com/73110
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/fmt_test.go
src/cmd/compile/internal/ssa/debug.go