]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/internal/ssa: distinguish exit and return blocks
authorKeith Randall <khr@golang.org>
Thu, 3 Sep 2015 16:09:59 +0000 (09:09 -0700)
committerKeith Randall <khr@golang.org>
Thu, 3 Sep 2015 17:42:38 +0000 (17:42 +0000)
commit10f38f51ef51467b5df1fb8f744a5597f87efb1e
treebfbffe6353c40b9269d7d857f4d242e70e9bc2b5
parent73024083b08509414e98061d894239386ddd8ba0
[dev.ssa] cmd/compile/internal/ssa: distinguish exit and return blocks

It is confusing to have exceptional edges jump back into
real code.  Distinguish return blocks, which execute acutal
code, and the exit block, which is a merge point for the regular
and exceptional return flow.

Prevent critical edge insertion from adding blocks on edges
into the exit block.  These added blocks serve no purpose and
add a bunch of dead jumps to the assembly output.  Furthermore,
live variable analysis is confused by these jumps.

Change-Id: Ifd69e6c00e90338ed147e7cb351b5100dc0364df
Reviewed-on: https://go-review.googlesource.com/14254
Reviewed-by: David Chase <drchase@google.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/gen/genericOps.go
src/cmd/compile/internal/ssa/opGen.go