mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/gc: remove OHMUL Op
Previously the compiler rewrote constant division into OHMUL operations, but that rewriting was moved to SSA in CL 37015. Now OHMUL is unused, so we can get rid of it. Change-Id: Ib6fc7c2b6435510bafb5735b3b4f42cfd8ed8cdb Reviewed-on: https://go-review.googlesource.com/37750 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
77f64c50db
commit
d8a0f74801
7 changed files with 1 additions and 14 deletions
|
|
@ -152,7 +152,6 @@ var opnames = []string{
|
|||
OVARKILL: "VARKILL",
|
||||
OVARLIVE: "VARLIVE",
|
||||
OINDREGSP: "INDREGSP",
|
||||
OHMUL: "HMUL",
|
||||
ORETJMP: "RETJMP",
|
||||
OGETG: "GETG",
|
||||
OEND: "END",
|
||||
|
|
|
|||
|
|
@ -232,7 +232,6 @@ func instrumentnode(np **Node, init *Nodes, wr int, skip int) {
|
|||
OXOR,
|
||||
OSUB,
|
||||
OMUL,
|
||||
OHMUL,
|
||||
OEQ,
|
||||
ONE,
|
||||
OLT,
|
||||
|
|
|
|||
|
|
@ -1046,13 +1046,6 @@ var opToSSA = map[opAndType]ssa.Op{
|
|||
opAndType{ODIV, TFLOAT32}: ssa.OpDiv32F,
|
||||
opAndType{ODIV, TFLOAT64}: ssa.OpDiv64F,
|
||||
|
||||
opAndType{OHMUL, TINT8}: ssa.OpHmul8,
|
||||
opAndType{OHMUL, TUINT8}: ssa.OpHmul8u,
|
||||
opAndType{OHMUL, TINT16}: ssa.OpHmul16,
|
||||
opAndType{OHMUL, TUINT16}: ssa.OpHmul16u,
|
||||
opAndType{OHMUL, TINT32}: ssa.OpHmul32,
|
||||
opAndType{OHMUL, TUINT32}: ssa.OpHmul32u,
|
||||
|
||||
opAndType{ODIV, TINT8}: ssa.OpDiv8,
|
||||
opAndType{ODIV, TUINT8}: ssa.OpDiv8u,
|
||||
opAndType{ODIV, TINT16}: ssa.OpDiv16,
|
||||
|
|
@ -1848,7 +1841,7 @@ func (s *state) expr(n *Node) *ssa.Value {
|
|||
s.newValue2(op, pt, s.newValue1(ssa.OpComplexImag, pt, a), s.newValue1(ssa.OpComplexImag, pt, b)))
|
||||
}
|
||||
return s.newValue2(s.ssaOp(n.Op, n.Type), a.Type, a, b)
|
||||
case OAND, OOR, OHMUL, OXOR:
|
||||
case OAND, OOR, OXOR:
|
||||
a := s.expr(n.Left)
|
||||
b := s.expr(n.Right)
|
||||
return s.newValue2(s.ssaOp(n.Op, n.Type), a.Type, a, b)
|
||||
|
|
|
|||
|
|
@ -493,7 +493,6 @@ const (
|
|||
OINDREGSP // offset plus indirect of REGSP, such as 8(SP).
|
||||
|
||||
// arch-specific opcodes
|
||||
OHMUL // high mul: AMUL/AIMUL for unsigned/signed (OMUL uses AIMUL for both).
|
||||
ORETJMP // return to other function
|
||||
OGETG // runtime.getg() (read g pointer)
|
||||
|
||||
|
|
|
|||
|
|
@ -521,7 +521,6 @@ OpSwitch:
|
|||
OEQ,
|
||||
OGE,
|
||||
OGT,
|
||||
OHMUL,
|
||||
OLE,
|
||||
OLT,
|
||||
OLSH,
|
||||
|
|
|
|||
|
|
@ -287,7 +287,6 @@ func typeinit() {
|
|||
okfor[OLE] = okforcmp[:]
|
||||
okfor[OLT] = okforcmp[:]
|
||||
okfor[OMOD] = okforand[:]
|
||||
okfor[OHMUL] = okforarith[:]
|
||||
okfor[OMUL] = okforarith[:]
|
||||
okfor[ONE] = okforeq[:]
|
||||
okfor[OOR] = okforand[:]
|
||||
|
|
|
|||
|
|
@ -565,7 +565,6 @@ opswitch:
|
|||
|
||||
case OAND,
|
||||
OSUB,
|
||||
OHMUL,
|
||||
OMUL,
|
||||
OLT,
|
||||
OLE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue