Skip to content

Commit 7d77468

Browse files
committed
Enable duplicate predecessors verification
1 parent 6b1667f commit 7d77468

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/opcache/Optimizer/ssa_integrity.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,23 +348,19 @@ int ssa_verify_integrity(zend_op_array *op_array, zend_ssa *ssa, const char *ext
348348

349349
for (j = 0; j < block->predecessors_count; j++) {
350350
if (predecessors[j] >= 0) {
351+
int k;
351352
zend_basic_block *prev_block = &cfg->blocks[predecessors[j]];
352353
if (!(prev_block->flags & ZEND_BB_REACHABLE)) {
353354
FAIL("Predecessor %d of %d not reachable\n", predecessors[j], i);
354355
}
355356
if (!is_in_successors(prev_block, i)) {
356357
FAIL("Block %d successors missing %d\n", predecessors[j], i);
357358
}
358-
// TODO Right now CFG construction can generate the same predecessor multiple
359-
// times. Decide whether or not it should do that, for now disable the check.
360-
#if 0
361-
int k;
362359
for (k = 0; k < block->predecessors_count; k++) {
363360
if (k != j && predecessors[k] == predecessors[j]) {
364361
FAIL("Block %d has duplicate predecessor %d\n", i, predecessors[j]);
365362
}
366363
}
367-
#endif
368364
}
369365
}
370366
}

0 commit comments

Comments
 (0)