regalloc: removes unused Instr.AddedBeforeRegAlloc api (#2268)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
@@ -26,9 +26,6 @@ func (i *instruction) IsIndirectCall() bool { return i.kind == callIndirect }
|
||||
// IsReturn implements regalloc.Instr.
|
||||
func (i *instruction) IsReturn() bool { return i.kind == ret }
|
||||
|
||||
// AddedBeforeRegAlloc implements regalloc.Instr.
|
||||
func (i *instruction) AddedBeforeRegAlloc() bool { return i.addedBeforeRegAlloc }
|
||||
|
||||
// String implements regalloc.Instr.
|
||||
func (i *instruction) String() string {
|
||||
switch i.kind {
|
||||
|
||||
@@ -165,7 +165,7 @@ func (pos *labelPosition) InstrIteratorNext() *instruction {
|
||||
pos.cur = instr
|
||||
if instr == nil {
|
||||
return nil
|
||||
} else if instr.AddedBeforeRegAlloc() {
|
||||
} else if instr.addedBeforeRegAlloc {
|
||||
// Only concerned about the instruction added before regalloc.
|
||||
return instr
|
||||
}
|
||||
@@ -188,7 +188,7 @@ func (pos *labelPosition) InstrRevIteratorNext() *instruction {
|
||||
pos.cur = instr
|
||||
if instr == nil {
|
||||
return nil
|
||||
} else if instr.AddedBeforeRegAlloc() {
|
||||
} else if instr.addedBeforeRegAlloc {
|
||||
// Only concerned about the instruction added before regalloc.
|
||||
return instr
|
||||
}
|
||||
|
||||
@@ -51,11 +51,6 @@ func (i *instruction) IsReturn() bool {
|
||||
return i.kind == ret
|
||||
}
|
||||
|
||||
// AddedBeforeRegAlloc implements regalloc.Instr AddedBeforeRegAlloc.
|
||||
func (i *instruction) AddedBeforeRegAlloc() bool {
|
||||
return i.addedBeforeRegAlloc
|
||||
}
|
||||
|
||||
type defKind byte
|
||||
|
||||
const (
|
||||
|
||||
@@ -167,7 +167,7 @@ func (pos *labelPosition) InstrIteratorNext() *instruction {
|
||||
pos.cur = instr
|
||||
if instr == nil {
|
||||
return nil
|
||||
} else if instr.AddedBeforeRegAlloc() {
|
||||
} else if instr.addedBeforeRegAlloc {
|
||||
// Only concerned about the instruction added before regalloc.
|
||||
return instr
|
||||
}
|
||||
@@ -190,7 +190,7 @@ func (pos *labelPosition) InstrRevIteratorNext() *instruction {
|
||||
pos.cur = instr
|
||||
if instr == nil {
|
||||
return nil
|
||||
} else if instr.AddedBeforeRegAlloc() {
|
||||
} else if instr.addedBeforeRegAlloc {
|
||||
// Only concerned about the instruction added before regalloc.
|
||||
return instr
|
||||
}
|
||||
|
||||
@@ -120,7 +120,5 @@ type (
|
||||
IsIndirectCall() bool
|
||||
// IsReturn returns true if this instruction is a return instruction.
|
||||
IsReturn() bool
|
||||
// AddedBeforeRegAlloc returns true if this instruction is added before register allocation.
|
||||
AddedBeforeRegAlloc() bool
|
||||
}
|
||||
)
|
||||
|
||||
@@ -266,9 +266,6 @@ func (m *mockInstr) Defs(ret *[]VReg) []VReg {
|
||||
return *ret
|
||||
}
|
||||
|
||||
// AddedBeforeRegAlloc implements Instr.
|
||||
func (m *mockInstr) AddedBeforeRegAlloc() bool { return true }
|
||||
|
||||
// Uses implements Instr.
|
||||
func (m *mockInstr) Uses(ret *[]VReg) []VReg {
|
||||
*ret = append((*ret)[:0], m.uses...)
|
||||
|
||||
Reference in New Issue
Block a user