Skip to main content

component_has_internal_branch

Function component_has_internal_branch 

Source
fn component_has_internal_branch(
    graph: &PathGraph<'_>,
    component: &LoopComponent,
) -> bool
Expand description

Return true when a component contains a real in-loop branch.

The ordinary loop guard usually has one successor back into the SCC and one successor to the exit. That shape alone does not need the expensive branch budget. We only count branch points where two or more successors remain inside the SCC, such as if/match choices in the loop body.