aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/tighten.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2015-11-02 08:10:26 -0800
committerKeith Randall <khr@golang.org>2015-11-03 17:29:40 +0000
commit02f4d0a130ba95d7a03418c3ef308d7d21b34af3 (patch)
tree215eb9851e2a439261fd40af792b5d17688cccf9 /src/cmd/compile/internal/ssa/tighten.go
parent582baae22a108e0b5f09da52c20f5ced83fe6084 (diff)
downloadgo-02f4d0a130ba95d7a03418c3ef308d7d21b34af3.tar.gz
go-02f4d0a130ba95d7a03418c3ef308d7d21b34af3.zip
[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>
Diffstat (limited to 'src/cmd/compile/internal/ssa/tighten.go')
-rw-r--r--src/cmd/compile/internal/ssa/tighten.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/tighten.go b/src/cmd/compile/internal/ssa/tighten.go
index 4fa26d2d18..6726c06e76 100644
--- a/src/cmd/compile/internal/ssa/tighten.go
+++ b/src/cmd/compile/internal/ssa/tighten.go
@@ -54,8 +54,8 @@ func tighten(f *Func) {
for _, b := range f.Blocks {
for i := 0; i < len(b.Values); i++ {
v := b.Values[i]
- if v.Op == OpPhi || v.Op == OpGetClosurePtr || v.Op == OpConvert {
- // GetClosurePtr must stay in entry block.
+ if v.Op == OpPhi || v.Op == OpGetClosurePtr || v.Op == OpConvert || v.Op == OpArg {
+ // GetClosurePtr & Arg must stay in entry block.
// OpConvert must not float over call sites.
// TODO do we instead need a dependence edge of some sort for OpConvert?
// Would memory do the trick, or do we need something else that relates