Lines Matching refs:ssa_op

76 		const zend_op *opline, const zend_ssa_op *ssa_op,  in may_have_side_effects()  argument
181 if (is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def)) { in may_have_side_effects()
187 && ssa->vars[ssa_op->op2_use].escape_state != ESCAPE_STATE_NO_ESCAPE) { in may_have_side_effects()
212 return is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def); in may_have_side_effects()
214 return is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def) in may_have_side_effects()
215 || ssa->vars[ssa_op->op1_def].escape_state != ESCAPE_STATE_NO_ESCAPE; in may_have_side_effects()
218 if (is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def) in may_have_side_effects()
219 || ssa->vars[ssa_op->op1_def].escape_state != ESCAPE_STATE_NO_ESCAPE) { in may_have_side_effects()
224 ssa_op++; in may_have_side_effects()
236 if (is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def) in may_have_side_effects()
237 || ssa->vars[ssa_op->op1_def].escape_state != ESCAPE_STATE_NO_ESCAPE) { in may_have_side_effects()
294 …id add_operands_to_worklists(context *ctx, zend_op *opline, zend_ssa_op *ssa_op, zend_ssa *ssa, in… in add_operands_to_worklists() argument
295 if (ssa_op->result_use >= 0) { in add_operands_to_worklists()
296 add_to_worklists(ctx, ssa_op->result_use, check); in add_operands_to_worklists()
298 if (ssa_op->op1_use >= 0) { in add_operands_to_worklists()
299 if (!zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use) in add_operands_to_worklists()
301 && (ssa->var_info[ssa_op->op1_use].type & MAY_BE_REF) != 0)) { in add_operands_to_worklists()
302 add_to_worklists(ctx, ssa_op->op1_use, check); in add_operands_to_worklists()
304 add_to_phi_worklist_no_val(ctx, ssa_op->op1_use); in add_operands_to_worklists()
307 if (ssa_op->op2_use >= 0) { in add_operands_to_worklists()
308 if (!zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use) in add_operands_to_worklists()
310 && (ssa->var_info[ssa_op->op2_use].type & MAY_BE_REF) != 0)) { in add_operands_to_worklists()
311 add_to_worklists(ctx, ssa_op->op2_use, check); in add_operands_to_worklists()
313 add_to_phi_worklist_no_val(ctx, ssa_op->op2_use); in add_operands_to_worklists()
397 static inline bool is_free_of_live_var(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { in is_free_of_live_var() argument
401 if ((ctx->ssa->var_info[ssa_op->op1_use].type & (MAY_BE_REF|MAY_BE_ANY|MAY_BE_UNDEF)) != 0 in is_free_of_live_var()
402 && !may_be_refcounted(ctx->ssa->var_info[ssa_op->op1_use].type)) { in is_free_of_live_var()
407 return !is_var_dead(ctx, ssa_op->op1_use); in is_free_of_live_var()
414 static bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { in dce_instr() argument
424 if (is_free_of_live_var(ctx, opline, ssa_op)) { in dce_instr()
428 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))&& !is_var_dead(ctx, ssa_op->op1_use)) { in dce_instr()
429 if (!try_remove_var_def(ctx, ssa_op->op1_use, ssa_op->op1_use_chain, opline)) { in dce_instr()
430 if (may_be_refcounted(ssa->var_info[ssa_op->op1_use].type) in dce_instr()
432 free_var = ssa_op->op1_use; in dce_instr()
437 if ((opline->op2_type & (IS_VAR|IS_TMP_VAR)) && !is_var_dead(ctx, ssa_op->op2_use)) { in dce_instr()
438 if (!try_remove_var_def(ctx, ssa_op->op2_use, ssa_op->op2_use_chain, opline)) { in dce_instr()
439 if (may_be_refcounted(ssa->var_info[ssa_op->op2_use].type)) { in dce_instr()
445 free_var = ssa_op->op2_use; in dce_instr()
451 zend_ssa_rename_defs_of_instr(ctx->ssa, ssa_op); in dce_instr()
452 zend_ssa_remove_instr(ctx->ssa, opline, ssa_op); in dce_instr()
459 ssa_op->op1_use = free_var; in dce_instr()
460 ssa_op->op1_use_chain = ssa->vars[free_var].use_chain; in dce_instr()
461 ssa->vars[free_var].use_chain = ssa_op - ssa->ops; in dce_instr()
507 … may_break_varargs(const zend_op_array *op_array, const zend_ssa *ssa, const zend_ssa_op *ssa_op) { in may_break_varargs() argument
508 if (ssa_op->op1_def >= 0 in may_break_varargs()
509 && ssa->vars[ssa_op->op1_def].var < op_array->num_args) { in may_break_varargs()
512 if (ssa_op->op2_def >= 0 in may_break_varargs()
513 && ssa->vars[ssa_op->op2_def].var < op_array->num_args) { in may_break_varargs()
516 if (ssa_op->result_def >= 0 in may_break_varargs()
517 && ssa->vars[ssa_op->result_def].var < op_array->num_args) { in may_break_varargs()