]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: Make PPARAMOUT variables SSAable
authorKeith Randall <khr@golang.org>
Sun, 28 Feb 2016 01:49:31 +0000 (17:49 -0800)
committerKeith Randall <khr@golang.org>
Tue, 1 Mar 2016 02:00:04 +0000 (02:00 +0000)
commit6a8a9da572883d7aae7e4618ef2713c716e4edd7
tree30a71ad0ec9b638386fb883c73069c7efb58835a
parentacdb0da47da15cf78ed971e7aaf6b67a563dd0da
[dev.ssa] cmd/compile: Make PPARAMOUT variables SSAable

Add writeback code to each return location which copies
the final result back to the correct stack location.

Cgo plays tricky games by taking the address of a
in f(a int) (b int) and then using that address to
modify b.  So for cgo-generated Go code, disable the
SSAing of output args.

Update #14511

Change-Id: I95cba727d53699d31124eef41db0e03935862be9
Reviewed-on: https://go-review.googlesource.com/19988
Reviewed-by: Todd Neal <todd@tneal.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/cgo/out.go
src/cmd/compile/internal/gc/lex.go
src/cmd/compile/internal/gc/ssa.go