Lines Matching refs:ssa_op

76 		const zend_op *opline, const zend_ssa_op *ssa_op,  in may_have_side_effects()  argument
186 if (is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def)) { in may_have_side_effects()
192 && ssa->vars[ssa_op->op2_use].escape_state != ESCAPE_STATE_NO_ESCAPE) { in may_have_side_effects()
217 return is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def); in may_have_side_effects()
219 return is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def) in may_have_side_effects()
220 || ssa->vars[ssa_op->op1_def].escape_state != ESCAPE_STATE_NO_ESCAPE; in may_have_side_effects()
223 if (is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def) in may_have_side_effects()
224 || ssa->vars[ssa_op->op1_def].escape_state != ESCAPE_STATE_NO_ESCAPE) { in may_have_side_effects()
229 ssa_op++; in may_have_side_effects()
241 if (is_bad_mod(ssa, ssa_op->op1_use, ssa_op->op1_def) in may_have_side_effects()
242 || ssa->vars[ssa_op->op1_def].escape_state != ESCAPE_STATE_NO_ESCAPE) { in may_have_side_effects()
293 …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
294 if (ssa_op->result_use >= 0) { in add_operands_to_worklists()
295 add_to_worklists(ctx, ssa_op->result_use, check); in add_operands_to_worklists()
297 if (ssa_op->op1_use >= 0) { in add_operands_to_worklists()
298 if (!zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use) in add_operands_to_worklists()
300 && (ssa->var_info[ssa_op->op1_use].type & MAY_BE_REF) != 0)) { in add_operands_to_worklists()
301 add_to_worklists(ctx, ssa_op->op1_use, check); in add_operands_to_worklists()
303 add_to_phi_worklist_no_val(ctx, ssa_op->op1_use); in add_operands_to_worklists()
306 if (ssa_op->op2_use >= 0) { in add_operands_to_worklists()
307 if (!zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use) in add_operands_to_worklists()
309 && (ssa->var_info[ssa_op->op2_use].type & MAY_BE_REF) != 0)) { in add_operands_to_worklists()
310 add_to_worklists(ctx, ssa_op->op2_use, check); in add_operands_to_worklists()
312 add_to_phi_worklist_no_val(ctx, ssa_op->op2_use); in add_operands_to_worklists()
396 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
400 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()
401 && !may_be_refcounted(ctx->ssa->var_info[ssa_op->op1_use].type)) { in is_free_of_live_var()
406 return !is_var_dead(ctx, ssa_op->op1_use); in is_free_of_live_var()
413 static bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { in dce_instr() argument
423 if (is_free_of_live_var(ctx, opline, ssa_op)) { in dce_instr()
427 if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))&& !is_var_dead(ctx, ssa_op->op1_use)) { in dce_instr()
428 if (!try_remove_var_def(ctx, ssa_op->op1_use, ssa_op->op1_use_chain, opline)) { in dce_instr()
429 if (may_be_refcounted(ssa->var_info[ssa_op->op1_use].type) in dce_instr()
431 free_var = ssa_op->op1_use; in dce_instr()
436 if ((opline->op2_type & (IS_VAR|IS_TMP_VAR)) && !is_var_dead(ctx, ssa_op->op2_use)) { in dce_instr()
437 if (!try_remove_var_def(ctx, ssa_op->op2_use, ssa_op->op2_use_chain, opline)) { in dce_instr()
438 if (may_be_refcounted(ssa->var_info[ssa_op->op2_use].type)) { in dce_instr()
444 free_var = ssa_op->op2_use; in dce_instr()
450 zend_ssa_rename_defs_of_instr(ctx->ssa, ssa_op); in dce_instr()
451 zend_ssa_remove_instr(ctx->ssa, opline, ssa_op); in dce_instr()
458 ssa_op->op1_use = free_var; in dce_instr()
459 ssa_op->op1_use_chain = ssa->vars[free_var].use_chain; in dce_instr()
460 ssa->vars[free_var].use_chain = ssa_op - ssa->ops; in dce_instr()
506 … may_break_varargs(const zend_op_array *op_array, const zend_ssa *ssa, const zend_ssa_op *ssa_op) { in may_break_varargs() argument
507 if (ssa_op->op1_def >= 0 in may_break_varargs()
508 && ssa->vars[ssa_op->op1_def].var < op_array->num_args) { in may_break_varargs()
511 if (ssa_op->op2_def >= 0 in may_break_varargs()
512 && ssa->vars[ssa_op->op2_def].var < op_array->num_args) { in may_break_varargs()
515 if (ssa_op->result_def >= 0 in may_break_varargs()
516 && ssa->vars[ssa_op->result_def].var < op_array->num_args) { in may_break_varargs()