From 85eef64c23571bf045ba6bdd7f8b4828936979df Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 22 Sep 2025 09:47:28 -0700 Subject: [PATCH] Avoid extra block calculation during fuzz generation In the process of building up a control-flow graph of blocks within a generated function, these lines appear to re-calculate the edge links between successors and predecessors. This _should_ be taken care of by `FuncBuilder::add_edge` or so it would appear. This change removes the extra calculation, assuming it was a leftover from some incomplete refactoring during the initial work on this crate. --- src/fuzzing/func.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/fuzzing/func.rs b/src/fuzzing/func.rs index 7466d90e..829dde82 100644 --- a/src/fuzzing/func.rs +++ b/src/fuzzing/func.rs @@ -335,17 +335,6 @@ impl Func { builder.compute_doms(); - for block in 0..num_blocks { - builder.f.block_preds[block].clear(); - } - for block in 0..num_blocks { - for &succ in &builder.f.block_succs[block] { - builder.f.block_preds[succ.index()].push(Block::new(block)); - } - } - - builder.compute_doms(); - let alloc_vreg = |builder: &mut FuncBuilder, u: &mut Unstructured| { let vreg = VReg::new(builder.f.num_vregs, RegClass::arbitrary(u)?); builder.f.num_vregs += 1;