[dev.ssa] cmd/compile: start arguments as spilled

Declare a function's arguments as having already been
spilled so their use just requires a restore.

Allow spill locations to be portions of larger objects the stack.
Required to load portions of compound input arguments.

Rename the memory input to InputMem.  Use Arg for the
pre-spilled argument values.

Change-Id: I8fe2a03ffbba1022d98bfae2052b376b96d32dda
Reviewed-on: https://go-review.googlesource.com/16536
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Keith Randall 2015-11-02 08:10:26 -08:00
parent 582baae22a
commit 02f4d0a130
27 changed files with 470 additions and 141 deletions

View file

@ -26,12 +26,11 @@ type Func struct {
// when register allocation is done, maps value ids to locations
RegAlloc []Location
// map from *gc.Node to set of Values that represent that Node.
// The Node must be an ONAME with PPARAM, PPARAMOUT, or PAUTO class.
NamedValues map[GCNode][]*Value
// map from LocalSlot to set of Values that we want to store in that slot.
NamedValues map[LocalSlot][]*Value
// Names is a copy of NamedValues.Keys. We keep a separate list
// of keys to make iteration order deterministic.
Names []GCNode
Names []LocalSlot
}
// NumBlocks returns an integer larger than the id of any Block in the Func.