Skip to content

Commit 53c72bd

Browse files
committed
Voidify zend_cfg_compute_dominators_tree()
It always returned SUCCESS
1 parent 6a45664 commit 53c72bd

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

Zend/Optimizer/dfa_pass.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ zend_result zend_dfa_analyze_op_array(zend_op_array *op_array, zend_optimizer_ct
6464
}
6565

6666
/* Compute Dominators Tree */
67-
if (zend_cfg_compute_dominators_tree(op_array, &ssa->cfg) != SUCCESS) {
68-
return FAILURE;
69-
}
67+
zend_cfg_compute_dominators_tree(op_array, &ssa->cfg);
7068

7169
/* Identify reducible and irreducible loops */
7270
if (zend_cfg_identify_loops(op_array, &ssa->cfg) != SUCCESS) {

Zend/Optimizer/zend_cfg.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ static void compute_postnum_recursive(
681681

682682
/* Computes dominator tree using algorithm from "A Simple, Fast Dominance Algorithm" by
683683
* Cooper, Harvey and Kennedy. */
684-
ZEND_API int zend_cfg_compute_dominators_tree(const zend_op_array *op_array, zend_cfg *cfg) /* {{{ */
684+
ZEND_API void zend_cfg_compute_dominators_tree(const zend_op_array *op_array, zend_cfg *cfg) /* {{{ */
685685
{
686686
zend_basic_block *blocks = cfg->blocks;
687687
int blocks_count = cfg->blocks_count;
@@ -768,7 +768,6 @@ ZEND_API int zend_cfg_compute_dominators_tree(const zend_op_array *op_array, zen
768768
}
769769

770770
free_alloca(postnum, use_heap);
771-
return SUCCESS;
772771
}
773772
/* }}} */
774773

Zend/Optimizer/zend_cfg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ BEGIN_EXTERN_C()
119119
ZEND_API void zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t build_flags, zend_cfg *cfg);
120120
void zend_cfg_remark_reachable_blocks(const zend_op_array *op_array, zend_cfg *cfg);
121121
ZEND_API void zend_cfg_build_predecessors(zend_arena **arena, zend_cfg *cfg);
122-
ZEND_API int zend_cfg_compute_dominators_tree(const zend_op_array *op_array, zend_cfg *cfg);
122+
ZEND_API void zend_cfg_compute_dominators_tree(const zend_op_array *op_array, zend_cfg *cfg);
123123
ZEND_API int zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cfg);
124124

125125
END_EXTERN_C()

ext/opcache/jit/zend_jit.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,9 +1280,7 @@ static int zend_jit_build_cfg(const zend_op_array *op_array, zend_cfg *cfg)
12801280
zend_cfg_build_predecessors(&CG(arena), cfg);
12811281

12821282
/* Compute Dominators Tree */
1283-
if (zend_cfg_compute_dominators_tree(op_array, cfg) != SUCCESS) {
1284-
return FAILURE;
1285-
}
1283+
zend_cfg_compute_dominators_tree(op_array, cfg);
12861284

12871285
/* Identify reducible and irreducible loops */
12881286
if (zend_cfg_identify_loops(op_array, cfg) != SUCCESS) {

0 commit comments

Comments
 (0)