Skip to content

Commit

Permalink
feat: merge basic blocks algorithm (#956)
Browse files Browse the repository at this point in the history
Any basic block with a single successor that has no other predecessors
can be merged. (So long as the successor is not the exit block; nor the
entry block, as that implicitly has another predecessor).

Implement via Replace (2 BBs - > one BB containing 2 DFGs, which adopt
the original BB's children) and 2*InlineDFG.

Closes #561.
  • Loading branch information
acl-cqc committed May 10, 2024
1 parent c45e6fc commit 33ab50d
Show file tree
Hide file tree
Showing 2 changed files with 399 additions and 0 deletions.
1 change: 1 addition & 0 deletions hugr/src/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

pub mod const_fold;
mod half_node;
pub mod merge_bbs;
pub mod nest_cfgs;
Loading

0 comments on commit 33ab50d

Please sign in to comment.