Skip to content

Commit

Permalink
Simplify back-edge logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed May 17, 2023
1 parent ada7f1c commit 8c2c695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_mir_transform/src/ctfe_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn has_back_edge(
return false;
}
// Check if any of the dominators of the node are also the node's successor.
doms.dominators(node).any(|dom| node_data.terminator().successors().any(|succ| succ == dom))
node_data.terminator().successors().any(|succ| doms.dominates(succ, node))
}

fn insert_counter(basic_block_data: &mut BasicBlockData<'_>) {
Expand Down

0 comments on commit 8c2c695

Please sign in to comment.