]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/internal/ssa: simplify how exit blocks are used
authorKeith Randall <khr@golang.org>
Thu, 10 Sep 2015 01:03:41 +0000 (18:03 -0700)
committerKeith Randall <khr@golang.org>
Fri, 11 Sep 2015 06:02:39 +0000 (06:02 +0000)
commitf5c53e0deb37b6f108e73bdb8b9a5955b2db5315
tree000ca133db4a5f176059d3a91cb34f5ed93a99a8
parentc244ce097c1d75b4fd178683f74bfd9318a81ebe
[dev.ssa] cmd/compile/internal/ssa: simplify how exit blocks are used

Move to implicit (mostly) instead of explicit exit blocks.
RET and RETJMP have no outgoing edges - they implicitly exit.
CALL only has one outgoing edge, as its exception edge is
implicit as well.
Exit blocks are only used for unconditionally panicking code,
like the failed branches of nil and bounds checks.

There may now be more than one exit block.  No merges happen
at exit blocks.

The only downside is it is harder to find all the places code
can exit the method.  See the reverse dominator code for an
example.

Change-Id: I42e2fd809a4bf81301ab993e29ad9f203ce48eb0
Reviewed-on: https://go-review.googlesource.com/14462
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssa/critical.go
src/cmd/compile/internal/ssa/dom.go
src/cmd/compile/internal/ssa/gen/genericOps.go
src/cmd/compile/internal/ssa/opGen.go