fn compute_loop_exit_candidates(
cfg: &CfgInfo,
explored: &mut HashSet<BlockId>,
ordered_loops: &mut Vec<BlockId>,
loop_exits: &mut HashMap<BlockId, LinkedHashMap<BlockId, LoopExitCandidateInfo>>,
parent_loops: Vec<(BlockId, usize)>,
block_id: BlockId,
)
Expand description
Compute the loop exit candidates.
There may be several candidates with the same “optimality” (same number of occurrences, etc.), in which case we choose the first one which was registered (the order in which we explore the graph is deterministic): this is why we store the candidates in a linked hash map.