refactor(ssa): streamline operand iteration and formatting in ssa_transfer module

This commit is contained in:
elipeter 2026-06-02 20:39:11 -05:00
parent 5615074177
commit 4c824ed543
2 changed files with 4 additions and 5 deletions

View file

@ -5763,8 +5763,7 @@ pub(super) fn transfer_inst(
for &u in uses {
if state.get(u).is_some() {
saw_tainted = true;
let (am, av) =
ssa_value_validated_bits(u, ssa, transfer.interner, state);
let (am, av) = ssa_value_validated_bits(u, ssa, transfer.interner, state);
tainted_must_all &= am;
tainted_may_any |= av;
}

View file

@ -65,9 +65,9 @@ fn rv_traces_to_constant(
}
Some(SsaOp::Phi(operands)) => {
!operands.is_empty()
&& operands
.iter()
.all(|(_, u)| rv_traces_to_constant(ssa, *u, all_param_values, depth + 1, budget))
&& operands.iter().all(|(_, u)| {
rv_traces_to_constant(ssa, *u, all_param_values, depth + 1, budget)
})
}
_ => false,
}