pub fn body_transform_operands<F: FnMut(&Span, &mut Vec<Statement>, &mut Operand)>(
blocks: &mut Vector<BlockId, BlockData>,
f: &mut F,
)
Expand description
Transform a body by applying a function to its operands, and inserting the statements generated by the operands at the end of the block. Useful to implement a pass on operands (see e.g., [crate::extract_global_assignments]).
The span argument given to f
is the span argument of the Terminator
containing the operand. f
should explore the operand it receives, and
push statements to the vector it receives as input.