Skip to content

Commit

Permalink
fix(ssa refactor): filter unreachable blocks from cfg (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
joss-aztec committed Jun 5, 2023
1 parent 1dcd2ee commit 202c345
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/noirc_evaluator/src/ssa_refactor/ir/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ impl ControlFlowGraph {
cfg
}

/// Compute all of the edges between each block in the function
/// Compute all of the edges between each reachable block in the function
fn compute(&mut self, func: &Function) {
for (basic_block_id, basic_block) in func.dfg.basic_blocks_iter() {
for basic_block_id in func.reachable_blocks() {
let basic_block = &func.dfg[basic_block_id];
self.compute_block(basic_block_id, basic_block);
}
}
Expand Down

0 comments on commit 202c345

Please sign in to comment.