mirror of
https://github.com/php/php-src.git
synced 2026-03-28 02:02:32 +01:00
Don't optimize function if inference failed
This was respected only for the single-function optimizations, not in func-info mode.
This commit is contained in:
@@ -1488,8 +1488,11 @@ int zend_optimize_script(zend_script *script, zend_long optimization_level, zend
|
||||
for (i = 0; i < call_graph.op_arrays_count; i++) {
|
||||
func_info = ZEND_FUNC_INFO(call_graph.op_arrays[i]);
|
||||
if (func_info) {
|
||||
zend_dfa_analyze_op_array(call_graph.op_arrays[i], &ctx, &func_info->ssa);
|
||||
func_info->flags = func_info->ssa.cfg.flags;
|
||||
if (zend_dfa_analyze_op_array(call_graph.op_arrays[i], &ctx, &func_info->ssa) == SUCCESS) {
|
||||
func_info->flags = func_info->ssa.cfg.flags;
|
||||
} else {
|
||||
ZEND_SET_FUNC_INFO(call_graph.op_arrays[i], NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user