Skip to content

Commit 21e44ae

Browse files
authored
Avoid extra block calculation during fuzz generation (#245)
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.
1 parent 67677b1 commit 21e44ae

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/fuzzing/func.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -448,14 +448,6 @@ impl Func {
448448
}
449449
builder.compute_doms();
450450

451-
for block in 0..num_blocks {
452-
builder.f.block_preds[block].clear();
453-
for &succ in &builder.f.block_succs[block] {
454-
builder.f.block_preds[succ.index()].push(Block::new(block));
455-
}
456-
}
457-
builder.compute_doms();
458-
459451
let alloc_vreg = |builder: &mut FuncBuilder, u: &mut Unstructured| {
460452
let vreg = VReg::new(builder.f.num_vregs, RegClass::arbitrary(u)?);
461453
builder.f.num_vregs += 1;

0 commit comments

Comments
 (0)