]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: move more PAUTOHEAP to SSA construction
authorMatthew Dempsky <mdempsky@google.com>
Tue, 12 Jan 2021 06:58:23 +0000 (22:58 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 14 Jan 2021 06:10:09 +0000 (06:10 +0000)
commitf97983249a812c2b079a489fc990fbeb3695be4d
tree2ecf5ed8eab72fa168faa97436ec0d1e708c4439
parent447630042588a14aec6680e624113258d3849d49
[dev.regabi] cmd/compile: move more PAUTOHEAP to SSA construction

This CL moves almost all PAUTOHEAP handling code to SSA construction.
Instead of changing Names to PAUTOHEAP, escape analysis now only sets
n.Esc() to ir.EscHeap, and SSA handles creating the "&x"
pseudo-variables and associating them via Heapaddr.

This CL also gets rid of n.Stackcopy, which was used to distinguish
the heap copy of a parameter used within a function from the stack
copy used in the function calling convention. In practice, this is
always obvious from context: liveness and function prologue/epilogue
want to know about the stack copies, and everywhere else wants the
heap copy.

Hopefully moving all parameter/result handling into SSA helps with
making the register ABI stuff easier.

Also, the only remaining uses of PAUTOHEAP are now for closure
variables, so I intend to rename it to PCLOSUREVAR or get rid of those
altogether too. But this CL is already big and scary enough.

Change-Id: Ief5ef6205041b9d0ee445314310c0c5a98187e77
Reviewed-on: https://go-review.googlesource.com/c/go/+/283233
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
12 files changed:
src/cmd/compile/internal/dwarfgen/dwarf.go
src/cmd/compile/internal/escape/escape.go
src/cmd/compile/internal/gc/compile.go
src/cmd/compile/internal/inline/inl.go
src/cmd/compile/internal/ir/name.go
src/cmd/compile/internal/ir/sizeof_test.go
src/cmd/compile/internal/liveness/plive.go
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/walk/assign.go
src/cmd/compile/internal/walk/complit.go
src/cmd/compile/internal/walk/stmt.go
src/cmd/compile/internal/walk/walk.go