Remove Function::is_call

The documentation says that this is only used for heuristics, but it
is never actually called. This should be removed for now and perhaps
added back later if we find an actual use for it.
This commit is contained in:
Amanieu d'Antras
2021-09-03 13:30:23 +02:00
parent 7724dc6f5a
commit a243c4e575
4 changed files with 3 additions and 16 deletions

View File

@@ -15,7 +15,6 @@ use arbitrary::{Arbitrary, Unstructured};
pub enum InstOpcode {
Phi,
Op,
Call,
Ret,
Branch,
}
@@ -104,10 +103,6 @@ impl Function for Func {
&self.block_params[block.index()][..]
}
fn is_call(&self, insn: Inst) -> bool {
self.insts[insn.index()].op == InstOpcode::Call
}
fn is_ret(&self, insn: Inst) -> bool {
self.insts[insn.index()].op == InstOpcode::Ret
}
@@ -500,11 +495,10 @@ impl Func {
.all(|op| !builder.f.reftype_vregs.contains(&op.vreg()))
&& bool::arbitrary(u)?;
let op = *u.choose(&[InstOpcode::Op, InstOpcode::Call])?;
builder.add_inst(
Block::new(block),
InstData {
op,
op: InstOpcode::Op,
operands,
clobbers,
is_safepoint,