Voidify zend_ssa_find_sccs()

It always returned SUCCESS
This commit is contained in:
George Peter Banyard 2021-09-20 18:12:31 +01:00
parent 57e4bd2be3
commit ad3544b08c
4 changed files with 4 additions and 10 deletions

View file

@ -97,9 +97,7 @@ zend_result zend_dfa_analyze_op_array(zend_op_array *op_array, zend_optimizer_ct
return FAILURE; return FAILURE;
} }
if (zend_ssa_find_sccs(op_array, ssa) != SUCCESS){ zend_ssa_find_sccs(op_array, ssa);
return FAILURE;
}
if (zend_ssa_inference(&ctx->arena, op_array, ctx->script, ssa, ctx->optimization_level) != SUCCESS) { if (zend_ssa_inference(&ctx->arena, op_array, ctx->script, ssa, ctx->optimization_level) != SUCCESS) {
return FAILURE; return FAILURE;

View file

@ -210,7 +210,7 @@ static void zend_ssa_check_scc_var(const zend_op_array *op_array, zend_ssa *ssa,
} }
/* }}} */ /* }}} */
ZEND_API int zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa) /* {{{ */ ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa) /* {{{ */
{ {
int index = 0, *dfs, *root; int index = 0, *dfs, *root;
zend_worklist_stack stack; zend_worklist_stack stack;
@ -251,8 +251,6 @@ ZEND_API int zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa) /*
ZEND_WORKLIST_STACK_FREE_ALLOCA(&stack, stack_use_heap); ZEND_WORKLIST_STACK_FREE_ALLOCA(&stack, stack_use_heap);
free_alloca(root, root_use_heap); free_alloca(root, root_use_heap);
free_alloca(dfs, dfs_use_heap); free_alloca(dfs, dfs_use_heap);
return SUCCESS;
} }
/* }}} */ /* }}} */

View file

@ -229,7 +229,7 @@ static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b)
BEGIN_EXTERN_C() BEGIN_EXTERN_C()
ZEND_API int zend_ssa_find_false_dependencies(const zend_op_array *op_array, zend_ssa *ssa); ZEND_API int zend_ssa_find_false_dependencies(const zend_op_array *op_array, zend_ssa *ssa);
ZEND_API int zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa); ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
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); 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);
ZEND_API uint32_t zend_array_element_type(uint32_t t1, zend_uchar op_type, int write, int insert); ZEND_API uint32_t zend_array_element_type(uint32_t t1, zend_uchar op_type, int write, int insert);

View file

@ -1323,9 +1323,7 @@ static int zend_jit_op_array_analyze1(const zend_op_array *op_array, zend_script
return FAILURE; return FAILURE;
} }
if (zend_ssa_find_sccs(op_array, ssa) != SUCCESS){ zend_ssa_find_sccs(op_array, ssa);
return FAILURE;
}
} }
return SUCCESS; return SUCCESS;