Skip to content

Commit 85eef64

Browse files
committed
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.
1 parent 96f0b9d commit 85eef64

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/fuzzing/func.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -335,17 +335,6 @@ impl Func {
335335

336336
builder.compute_doms();
337337

338-
for block in 0..num_blocks {
339-
builder.f.block_preds[block].clear();
340-
}
341-
for block in 0..num_blocks {
342-
for &succ in &builder.f.block_succs[block] {
343-
builder.f.block_preds[succ.index()].push(Block::new(block));
344-
}
345-
}
346-
347-
builder.compute_doms();
348-
349338
let alloc_vreg = |builder: &mut FuncBuilder, u: &mut Unstructured| {
350339
let vreg = VReg::new(builder.f.num_vregs, RegClass::arbitrary(u)?);
351340
builder.f.num_vregs += 1;

0 commit comments

Comments
 (0)