Skip to content

Commit ad3544b

Browse files
committed
Voidify zend_ssa_find_sccs()
It always returned SUCCESS
1 parent 57e4bd2 commit ad3544b

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

Diff for: Zend/Optimizer/dfa_pass.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ zend_result zend_dfa_analyze_op_array(zend_op_array *op_array, zend_optimizer_ct
9797
return FAILURE;
9898
}
9999

100-
if (zend_ssa_find_sccs(op_array, ssa) != SUCCESS){
101-
return FAILURE;
102-
}
100+
zend_ssa_find_sccs(op_array, ssa);
103101

104102
if (zend_ssa_inference(&ctx->arena, op_array, ctx->script, ssa, ctx->optimization_level) != SUCCESS) {
105103
return FAILURE;

Diff for: Zend/Optimizer/zend_inference.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static void zend_ssa_check_scc_var(const zend_op_array *op_array, zend_ssa *ssa,
210210
}
211211
/* }}} */
212212

213-
ZEND_API int zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa) /* {{{ */
213+
ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa) /* {{{ */
214214
{
215215
int index = 0, *dfs, *root;
216216
zend_worklist_stack stack;
@@ -251,8 +251,6 @@ ZEND_API int zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa) /*
251251
ZEND_WORKLIST_STACK_FREE_ALLOCA(&stack, stack_use_heap);
252252
free_alloca(root, root_use_heap);
253253
free_alloca(dfs, dfs_use_heap);
254-
255-
return SUCCESS;
256254
}
257255
/* }}} */
258256

Diff for: Zend/Optimizer/zend_inference.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b)
229229
BEGIN_EXTERN_C()
230230

231231
ZEND_API int zend_ssa_find_false_dependencies(const zend_op_array *op_array, zend_ssa *ssa);
232-
ZEND_API int zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
232+
ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
233233
ZEND_API int zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level);
234234

235235
ZEND_API uint32_t zend_array_element_type(uint32_t t1, zend_uchar op_type, int write, int insert);

Diff for: ext/opcache/jit/zend_jit.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -1323,9 +1323,7 @@ static int zend_jit_op_array_analyze1(const zend_op_array *op_array, zend_script
13231323
return FAILURE;
13241324
}
13251325

1326-
if (zend_ssa_find_sccs(op_array, ssa) != SUCCESS){
1327-
return FAILURE;
1328-
}
1326+
zend_ssa_find_sccs(op_array, ssa);
13291327
}
13301328

13311329
return SUCCESS;

0 commit comments

Comments
 (0)