diff options
author | Matthew Dempsky <mdempsky@google.com> | 2017-03-07 12:31:59 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2017-03-07 21:17:03 +0000 |
commit | 5e4a958351222233fbc6f82ab621a7d15299eea5 (patch) | |
tree | f90e1745811bb8df1c22a95d2c9b8c00754d807c /src/cmd/compile/internal/mips | |
parent | b992c2649e6c30d25baeb3c26aba0e90b800a1f4 (diff) | |
download | go-5e4a958351222233fbc6f82ab621a7d15299eea5.tar.gz go-5e4a958351222233fbc6f82ab621a7d15299eea5.zip |
cmd/compile: refactor portable SSA Op handling
Several SSA ops will always behave identically regardless of target
architecture, so handle those within gc/ssa.go instead.
Passes toolstash-check -all.
Change-Id: I54d514e80ab86723e44332a5a38e3054cbca8c5d
Reviewed-on: https://go-review.googlesource.com/37931
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/mips')
-rw-r--r-- | src/cmd/compile/internal/mips/ssa.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/cmd/compile/internal/mips/ssa.go b/src/cmd/compile/internal/mips/ssa.go index 5c69adf6cd..0d0e7eae96 100644 --- a/src/cmd/compile/internal/mips/ssa.go +++ b/src/cmd/compile/internal/mips/ssa.go @@ -74,16 +74,7 @@ func storeByType(t ssa.Type, r int16) obj.As { } func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { - s.SetPos(v.Pos) switch v.Op { - case ssa.OpInitMem: - // memory arg needs no code - case ssa.OpArg: - // input args need no code - case ssa.OpSP, ssa.OpSB, ssa.OpGetG: - // nothing to do - case ssa.OpSelect0, ssa.OpSelect1: - // nothing to do case ssa.OpCopy, ssa.OpMIPSMOVWconvert, ssa.OpMIPSMOVWreg: t := v.Type if t.IsMemory() { @@ -778,16 +769,6 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { p6 := gc.Prog(obj.ANOP) gc.Patch(p2, p6) - case ssa.OpVarDef: - gc.Gvardef(v.Aux.(*gc.Node)) - case ssa.OpVarKill: - gc.Gvarkill(v.Aux.(*gc.Node)) - case ssa.OpVarLive: - gc.Gvarlive(v.Aux.(*gc.Node)) - case ssa.OpKeepAlive: - gc.KeepAlive(v) - case ssa.OpPhi: - gc.CheckLoweredPhi(v) case ssa.OpMIPSLoweredNilCheck: // Issue a load which will fault if arg is nil. p := gc.Prog(mips.AMOVB) |