charon_lib::transform::ullbc_to_llbc

Function loop_entry_is_reachable_from_inner

source
fn loop_entry_is_reachable_from_inner(
    cfg: &CfgInfo,
    loop_entry: BlockId,
    block_id: BlockId,
) -> bool
Expand description

Check if a loop entry is reachable from a node, in a graph where we remove the backward edges going directly to the loop entry.

If the loop entry is not reachable, it means that:

  • the loop entry is not reachable at all
  • or it is only reachable through an outer loop

The starting node should be a (transitive) child of the loop entry. We use this to find candidates for loop exits.