aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/func.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2017-03-13 21:51:08 -0400
committerCherry Zhang <cherryyz@google.com>2017-03-16 14:25:04 +0000
commitc8f38b339875e020f50bedbdb8cfd8a7a1ef12b1 (patch)
tree9e37476d9604899a9283c845019a13acdc753802 /src/cmd/compile/internal/ssa/func.go
parentd75925d6bad2576bd80c442ff3b23ba22ffb2c68 (diff)
downloadgo-c8f38b339875e020f50bedbdb8cfd8a7a1ef12b1.tar.gz
go-c8f38b339875e020f50bedbdb8cfd8a7a1ef12b1.zip
cmd/compile: use type information in Aux for Store size
Remove size AuxInt in Store, and alignment in Move/Zero. We still pass size AuxInt to Move/Zero, as it is used for partial Move/Zero lowering (e.g. cmd/compile/internal/ssa/gen/386.rules:288). SizeAndAlign is gone. Passes "toolstash -cmp" on std. Change-Id: I1ca34652b65dd30de886940e789fcf41d521475d Reviewed-on: https://go-review.googlesource.com/38150 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/func.go')
-rw-r--r--src/cmd/compile/internal/ssa/func.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/func.go b/src/cmd/compile/internal/ssa/func.go
index fc7db290bf..a26c92ef87 100644
--- a/src/cmd/compile/internal/ssa/func.go
+++ b/src/cmd/compile/internal/ssa/func.go
@@ -352,6 +352,21 @@ func (b *Block) NewValue3I(pos src.XPos, op Op, t Type, auxint int64, arg0, arg1
return v
}
+// NewValue3A returns a new value in the block with three argument and an aux value.
+func (b *Block) NewValue3A(pos src.XPos, op Op, t Type, aux interface{}, arg0, arg1, arg2 *Value) *Value {
+ v := b.Func.newValue(op, t, b, pos)
+ v.AuxInt = 0
+ v.Aux = aux
+ v.Args = v.argstorage[:3]
+ v.argstorage[0] = arg0
+ v.argstorage[1] = arg1
+ v.argstorage[2] = arg2
+ arg0.Uses++
+ arg1.Uses++
+ arg2.Uses++
+ return v
+}
+
// NewValue4 returns a new value in the block with four arguments and zero aux values.
func (b *Block) NewValue4(pos src.XPos, op Op, t Type, arg0, arg1, arg2, arg3 *Value) *Value {
v := b.Func.newValue(op, t, b, pos)