Skip to content

Commit 6a45664

Browse files
committed
Voidify zend_cfg_build_predecessors()
It always returned SUCCESS
1 parent 5037866 commit 6a45664

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

Zend/Optimizer/dfa_pass.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ zend_result zend_dfa_analyze_op_array(zend_op_array *op_array, zend_optimizer_ct
5757
return FAILURE;
5858
}
5959

60-
if (zend_cfg_build_predecessors(&ctx->arena, &ssa->cfg) != SUCCESS) {
61-
return FAILURE;
62-
}
60+
zend_cfg_build_predecessors(&ctx->arena, &ssa->cfg);
6361

6462
if (ctx->debug_level & ZEND_DUMP_DFA_CFG) {
6563
zend_dump_op_array(op_array, ZEND_DUMP_CFG, "dfa cfg", &ssa->cfg);

Zend/Optimizer/zend_cfg.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ ZEND_API void zend_build_cfg(zend_arena **arena, const zend_op_array *op_array,
600600
}
601601
/* }}} */
602602

603-
ZEND_API int zend_cfg_build_predecessors(zend_arena **arena, zend_cfg *cfg) /* {{{ */
603+
ZEND_API void zend_cfg_build_predecessors(zend_arena **arena, zend_cfg *cfg) /* {{{ */
604604
{
605605
int j, s, edges;
606606
zend_basic_block *b;
@@ -658,8 +658,6 @@ ZEND_API int zend_cfg_build_predecessors(zend_arena **arena, zend_cfg *cfg) /* {
658658
}
659659
}
660660
}
661-
662-
return SUCCESS;
663661
}
664662
/* }}} */
665663

Zend/Optimizer/zend_cfg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ BEGIN_EXTERN_C()
118118

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);
121-
ZEND_API int zend_cfg_build_predecessors(zend_arena **arena, zend_cfg *cfg);
121+
ZEND_API void zend_cfg_build_predecessors(zend_arena **arena, zend_cfg *cfg);
122122
ZEND_API int 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

ext/opcache/jit/zend_jit.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,9 +1277,7 @@ static int zend_jit_build_cfg(const zend_op_array *op_array, zend_cfg *cfg)
12771277
return FAILURE;
12781278
}
12791279

1280-
if (zend_cfg_build_predecessors(&CG(arena), cfg) != SUCCESS) {
1281-
return FAILURE;
1282-
}
1280+
zend_cfg_build_predecessors(&CG(arena), cfg);
12831281

12841282
/* Compute Dominators Tree */
12851283
if (zend_cfg_compute_dominators_tree(op_array, cfg) != SUCCESS) {

0 commit comments

Comments
 (0)