Cranelift: use .enumerate() to avoid indexing in s390x backend (#5094)
This can help rustc/llvm avoid bounds checks, but more importantly I will have future changes here that remove indexing of params, and instead hand them out as an iterator.
This commit is contained in:
@@ -245,9 +245,7 @@ impl ABIMachineSpec for S390xMachineDeps {
|
|||||||
next_gpr += 1;
|
next_gpr += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in 0..params.len() {
|
for (i, mut param) in params.iter().copied().enumerate() {
|
||||||
let mut param = params[i];
|
|
||||||
|
|
||||||
let intreg = in_int_reg(param.value_type);
|
let intreg = in_int_reg(param.value_type);
|
||||||
let fltreg = in_flt_reg(param.value_type);
|
let fltreg = in_flt_reg(param.value_type);
|
||||||
let vecreg = in_vec_reg(param.value_type);
|
let vecreg = in_vec_reg(param.value_type);
|
||||||
|
|||||||
Reference in New Issue
Block a user