Skip to content

Commit

Permalink
Remove unused module
Browse files Browse the repository at this point in the history
  • Loading branch information
ptersilie committed Dec 19, 2024
1 parent 214fcd5 commit 7aeae43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions ykrt/src/compile/jitc_yk/jit_ir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1635,14 +1635,14 @@ impl Inst {
f: &F,
) -> Result<Self, CompilationError>
where
F: Fn(InstIdx, &Module) -> Operand,
F: Fn(InstIdx) -> Operand,
{
let mapper = |m: &Module, x: &PackedOperand| match x.unpack(m) {
Operand::Var(iidx) => PackedOperand::new(&f(iidx, m)),
Operand::Var(iidx) => PackedOperand::new(&f(iidx)),
Operand::Const(_) => *x,
};
let op_mapper = |m: &Module, x: &Operand| match x {
Operand::Var(iidx) => f(*iidx, m),
let op_mapper = |x: &Operand| match x {
Operand::Var(iidx) => f(*iidx),
Operand::Const(c) => Operand::Const(*c),
};
let inst = match self {
Expand All @@ -1659,7 +1659,7 @@ impl Inst {
// Clone and map arguments.
let args = dc
.iter_args_idx()
.map(|x| op_mapper(m, &m.arg(x)))
.map(|x| op_mapper(&m.arg(x)))
.collect::<Vec<_>>();
let dc = DirectCallInst::new(m, dc.target, args)?;
Inst::Call(dc)
Expand All @@ -1669,14 +1669,14 @@ impl Inst {
// Clone and map arguments.
let args = ic
.iter_args_idx()
.map(|x| op_mapper(m, &m.arg(x)))
.map(|x| op_mapper(&m.arg(x)))
.collect::<Vec<_>>();
let icnew = IndirectCallInst::new(m, ic.ftyidx, op_mapper(m, &ic.target(m)), args)?;
let icnew = IndirectCallInst::new(m, ic.ftyidx, op_mapper(&ic.target(m)), args)?;
let idx = m.push_indirect_call(icnew)?;
Inst::IndirectCall(idx)
}
Inst::Const(c) => Inst::Const(*c),
Inst::Copy(iidx) => match f(*iidx, m) {
Inst::Copy(iidx) => match f(*iidx) {
Operand::Var(iidx) => Inst::Copy(iidx),
Operand::Const(cidx) => Inst::Const(cidx),
},
Expand Down Expand Up @@ -1719,7 +1719,7 @@ impl Inst {
x.safepoint,
x.args
.iter()
.map(|x| op_mapper(m, &x.unpack(m)))
.map(|x| op_mapper(&x.unpack(m)))
.collect::<Vec<_>>(),
)
})
Expand Down
2 changes: 1 addition & 1 deletion ykrt/src/compile/jitc_yk/opt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ impl Opt {
let mut iidx_map = vec![0; base];
let skipping = self.m.iter_skipping_insts().collect::<Vec<_>>();
for (iidx, inst) in skipping.into_iter() {
let c = inst.dup_and_remap_locals(&mut self.m, &|i: InstIdx, _m: &Module| {
let c = inst.dup_and_remap_locals(&mut self.m, &|i: InstIdx| {
let newiidx = iidx_map[usize::from(i)];
Operand::Var(InstIdx::try_from(newiidx).unwrap())
})?;
Expand Down

0 comments on commit 7aeae43

Please sign in to comment.