Skip to content

Commit e62c21c

Browse files
author
metrics
committed
refactor: simplify function signature for back edge detection
1 parent 7e893d2 commit e62c21c

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

  • crates/herkos-core/src/optimizer

crates/herkos-core/src/optimizer/licm.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ fn dominates(d: BlockId, b: BlockId, idom: &HashMap<BlockId, BlockId>) -> bool {
6666
/// Find all back edges in the CFG.
6767
///
6868
/// A back edge is (src, tgt) where tgt dominates src.
69-
fn find_back_edges(
70-
func: &IrFunction,
71-
idom: &HashMap<BlockId, BlockId>,
72-
) -> Vec<(BlockId, BlockId)> {
69+
fn find_back_edges(func: &IrFunction, idom: &HashMap<BlockId, BlockId>) -> Vec<(BlockId, BlockId)> {
7370
let mut back_edges = Vec::new();
7471
for block in &func.blocks {
7572
for succ in terminator_successors(&block.terminator) {

0 commit comments

Comments
 (0)