Remove references for sig (#5414)
This commit is contained in:
@@ -1018,11 +1018,11 @@ pub struct Callee<M: ABIMachineSpec> {
|
||||
fn get_special_purpose_param_register(
|
||||
f: &ir::Function,
|
||||
sigs: &SigSet,
|
||||
sig: &Sig,
|
||||
sig: Sig,
|
||||
purpose: ir::ArgumentPurpose,
|
||||
) -> Option<Reg> {
|
||||
let idx = f.signature.special_param_index(purpose)?;
|
||||
match &sigs.args(*sig)[idx] {
|
||||
match &sigs.args(sig)[idx] {
|
||||
&ABIArg::Slots { ref slots, .. } => match &slots[0] {
|
||||
&ABIArgSlot::Reg { reg, .. } => Some(reg.into()),
|
||||
_ => None,
|
||||
@@ -1100,11 +1100,11 @@ impl<M: ABIMachineSpec> Callee<M> {
|
||||
// argument or as a global value which often calculates the stack limit
|
||||
// from the arguments.
|
||||
let stack_limit =
|
||||
get_special_purpose_param_register(f, sigs, &sig, ir::ArgumentPurpose::StackLimit)
|
||||
get_special_purpose_param_register(f, sigs, sig, ir::ArgumentPurpose::StackLimit)
|
||||
.map(|reg| (reg, smallvec![]))
|
||||
.or_else(|| {
|
||||
f.stack_limit
|
||||
.map(|gv| gen_stack_limit::<M>(f, sigs, &sig, gv))
|
||||
.map(|gv| gen_stack_limit::<M>(f, sigs, sig, gv))
|
||||
});
|
||||
|
||||
// Determine whether a probestack call is required for large enough
|
||||
@@ -1225,7 +1225,7 @@ impl<M: ABIMachineSpec> Callee<M> {
|
||||
fn gen_stack_limit<M: ABIMachineSpec>(
|
||||
f: &ir::Function,
|
||||
sigs: &SigSet,
|
||||
sig: &Sig,
|
||||
sig: Sig,
|
||||
gv: ir::GlobalValue,
|
||||
) -> (Reg, SmallInstVec<M::I>) {
|
||||
let mut insts = smallvec![];
|
||||
@@ -1236,7 +1236,7 @@ fn gen_stack_limit<M: ABIMachineSpec>(
|
||||
fn generate_gv<M: ABIMachineSpec>(
|
||||
f: &ir::Function,
|
||||
sigs: &SigSet,
|
||||
sig: &Sig,
|
||||
sig: Sig,
|
||||
gv: ir::GlobalValue,
|
||||
insts: &mut SmallInstVec<M::I>,
|
||||
) -> Reg {
|
||||
|
||||
@@ -400,40 +400,40 @@ macro_rules! isle_lower_prelude_methods {
|
||||
regs.regs()[idx]
|
||||
}
|
||||
|
||||
fn abi_num_args(&mut self, abi: &Sig) -> usize {
|
||||
self.lower_ctx.sigs().num_args(*abi)
|
||||
fn abi_num_args(&mut self, abi: Sig) -> usize {
|
||||
self.lower_ctx.sigs().num_args(abi)
|
||||
}
|
||||
|
||||
fn abi_get_arg(&mut self, abi: &Sig, idx: usize) -> ABIArg {
|
||||
self.lower_ctx.sigs().get_arg(*abi, idx)
|
||||
fn abi_get_arg(&mut self, abi: Sig, idx: usize) -> ABIArg {
|
||||
self.lower_ctx.sigs().get_arg(abi, idx)
|
||||
}
|
||||
|
||||
fn abi_num_rets(&mut self, abi: &Sig) -> usize {
|
||||
self.lower_ctx.sigs().num_rets(*abi)
|
||||
fn abi_num_rets(&mut self, abi: Sig) -> usize {
|
||||
self.lower_ctx.sigs().num_rets(abi)
|
||||
}
|
||||
|
||||
fn abi_get_ret(&mut self, abi: &Sig, idx: usize) -> ABIArg {
|
||||
self.lower_ctx.sigs().get_ret(*abi, idx)
|
||||
fn abi_get_ret(&mut self, abi: Sig, idx: usize) -> ABIArg {
|
||||
self.lower_ctx.sigs().get_ret(abi, idx)
|
||||
}
|
||||
|
||||
fn abi_ret_arg(&mut self, abi: &Sig) -> Option<ABIArg> {
|
||||
self.lower_ctx.sigs().get_ret_arg(*abi)
|
||||
fn abi_ret_arg(&mut self, abi: Sig) -> Option<ABIArg> {
|
||||
self.lower_ctx.sigs().get_ret_arg(abi)
|
||||
}
|
||||
|
||||
fn abi_no_ret_arg(&mut self, abi: &Sig) -> Option<()> {
|
||||
if let Some(_) = self.lower_ctx.sigs().get_ret_arg(*abi) {
|
||||
fn abi_no_ret_arg(&mut self, abi: Sig) -> Option<()> {
|
||||
if let Some(_) = self.lower_ctx.sigs().get_ret_arg(abi) {
|
||||
None
|
||||
} else {
|
||||
Some(())
|
||||
}
|
||||
}
|
||||
|
||||
fn abi_sized_stack_arg_space(&mut self, abi: &Sig) -> i64 {
|
||||
self.lower_ctx.sigs()[*abi].sized_stack_arg_space()
|
||||
fn abi_sized_stack_arg_space(&mut self, abi: Sig) -> i64 {
|
||||
self.lower_ctx.sigs()[abi].sized_stack_arg_space()
|
||||
}
|
||||
|
||||
fn abi_sized_stack_ret_space(&mut self, abi: &Sig) -> i64 {
|
||||
self.lower_ctx.sigs()[*abi].sized_stack_ret_space()
|
||||
fn abi_sized_stack_ret_space(&mut self, abi: Sig) -> i64 {
|
||||
self.lower_ctx.sigs()[abi].sized_stack_ret_space()
|
||||
}
|
||||
|
||||
fn abi_arg_only_slot(&mut self, arg: &ABIArg) -> Option<ABIArgSlot> {
|
||||
|
||||
Reference in New Issue
Block a user