@@ -684,15 +684,13 @@ static int zend_jit_op_array_analyze1(const zend_op_array *op_array, zend_script
684
684
return SUCCESS ;
685
685
}
686
686
687
- static int zend_jit_op_array_analyze2 (const zend_op_array * op_array , zend_script * script , zend_ssa * ssa )
687
+ static int zend_jit_op_array_analyze2 (const zend_op_array * op_array , zend_script * script , zend_ssa * ssa , uint32_t optimization_level )
688
688
{
689
689
if ((JIT_G (opt_level ) >= ZEND_JIT_LEVEL_OPT_FUNC )
690
690
&& ssa -> cfg .blocks
691
691
&& op_array -> last_try_catch == 0
692
692
&& !(op_array -> fn_flags & ZEND_ACC_GENERATOR )
693
693
&& !(ssa -> cfg .flags & ZEND_FUNC_INDIRECT_VAR_ACCESS )) {
694
-
695
- uint32_t optimization_level = ZCG (accel_directives ).optimization_level ;
696
694
if (zend_ssa_inference (& CG (arena ), op_array , script , ssa , optimization_level ) != SUCCESS ) {
697
695
return FAILURE ;
698
696
}
@@ -3133,7 +3131,7 @@ static int zend_real_jit_func(zend_op_array *op_array, zend_script *script, cons
3133
3131
}
3134
3132
}
3135
3133
3136
- if (zend_jit_op_array_analyze2 (op_array , script , & ssa ) != SUCCESS ) {
3134
+ if (zend_jit_op_array_analyze2 (op_array , script , & ssa , ZCG ( accel_directives ). optimization_level ) != SUCCESS ) {
3137
3135
goto jit_failure ;
3138
3136
}
3139
3137
@@ -3458,7 +3456,7 @@ ZEND_EXT_API int zend_jit_script(zend_script *script)
3458
3456
}
3459
3457
info = ZEND_FUNC_INFO (call_graph .op_arrays [i ]);
3460
3458
if (info ) {
3461
- if (zend_jit_op_array_analyze2 (call_graph .op_arrays [i ], script , & info -> ssa ) != SUCCESS ) {
3459
+ if (zend_jit_op_array_analyze2 (call_graph .op_arrays [i ], script , & info -> ssa , ZCG ( accel_directives ). optimization_level ) != SUCCESS ) {
3462
3460
goto jit_failure ;
3463
3461
}
3464
3462
info -> flags = info -> ssa .cfg .flags ;
0 commit comments