Function rustc_mir_transform::dest_prop::find_candidates
source · fn find_candidates<'tcx>(body: &Body<'tcx>) -> Vec<CandidateAssignment<'tcx>>
Expand description
Scans the MIR for assignments between locals that we might want to consider merging.
This will filter out assignments that do not match the right form (as described in the top-level comment) and also throw out assignments that involve a local that has its address taken or is otherwise ineligible (eg. locals used as array indices are ignored because we cannot propagate arbitrary places into array indices).