mirror of
https://github.com/php/php-src.git
synced 2025-01-27 06:03:45 +08: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:
parent
78c2e0e342
commit
b9431ef4d5
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user