Skip to content

Commit 57e4bd2

Browse files
committed
Voidify zend_build_dfg()
It always returned SUCCESS
1 parent a06d6c3 commit 57e4bd2

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

Zend/Optimizer/zend_dfg.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ ZEND_API void zend_dfg_add_use_def_op(const zend_op_array *op_array, const zend_
247247
}
248248
/* }}} */
249249

250-
int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg *dfg, uint32_t build_flags) /* {{{ */
250+
void zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg *dfg, uint32_t build_flags) /* {{{ */
251251
{
252252
int set_size;
253253
zend_basic_block *blocks = cfg->blocks;
@@ -326,7 +326,5 @@ int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg
326326

327327
free_alloca(worklist, use_heap);
328328
}
329-
330-
return SUCCESS;
331329
}
332330
/* }}} */

Zend/Optimizer/zend_dfg.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typedef struct _zend_dfg {
4343

4444
BEGIN_EXTERN_C()
4545

46-
int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg *dfg, uint32_t build_flags);
46+
void zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg *dfg, uint32_t build_flags);
4747
ZEND_API void zend_dfg_add_use_def_op(const zend_op_array *op_array, const zend_op *opline, uint32_t build_flags, zend_bitset use, zend_bitset def);
4848

4949
END_EXTERN_C()

Zend/Optimizer/zend_ssa.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -926,10 +926,7 @@ ZEND_API zend_result zend_build_ssa(zend_arena **arena, const zend_script *scrip
926926
dfg.in = dfg.use + set_size * blocks_count;
927927
dfg.out = dfg.in + set_size * blocks_count;
928928

929-
if (zend_build_dfg(op_array, &ssa->cfg, &dfg, build_flags) != SUCCESS) {
930-
free_alloca(dfg.tmp, dfg_use_heap);
931-
return FAILURE;
932-
}
929+
zend_build_dfg(op_array, &ssa->cfg, &dfg, build_flags);
933930

934931
if (build_flags & ZEND_SSA_DEBUG_LIVENESS) {
935932
zend_dump_dfg(op_array, &ssa->cfg, &dfg);

0 commit comments

Comments
 (0)