Lines Matching refs:op_array
51 zend_op_array *op_array; member
75 zend_op_array *op_array, zend_ssa *ssa, in may_have_side_effects() argument
247 if (op_array->static_variables) { in may_have_side_effects()
335 return var_num >= ctx->op_array->last_var; in is_var_dead()
352 && var->use_chain == (opline - ctx->op_array->opcodes)) { in try_remove_var_def()
353 zend_op *def_opline = &ctx->op_array->opcodes[def]; in try_remove_var_def()
441 zend_bitset_excl(ctx->instr_dead, opline - ctx->op_array->opcodes); in dce_instr()
506 static inline bool may_break_varargs(const zend_op_array *op_array, const zend_ssa *ssa, const zend… in may_break_varargs() argument
508 && ssa->vars[ssa_op->op1_def].var < op_array->num_args) { in may_break_varargs()
512 && ssa->vars[ssa_op->op2_def].var < op_array->num_args) { in may_break_varargs()
516 && ssa->vars[ssa_op->result_def].var < op_array->num_args) { in may_break_varargs()
526 int dce_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *optimizer_ctx, zend_ssa *ssa… in dce_optimize_op_array() argument
536 ctx.op_array = op_array; in dce_optimize_op_array()
541 ctx.instr_worklist_len = zend_bitset_len(op_array->last); in dce_optimize_op_array()
556 if (phi->var >= op_array->last_var in dce_optimize_op_array()
577 if (op_array->opcodes[i].opcode == ZEND_OP_DATA) { in dce_optimize_op_array()
584 add_operands_to_worklists(&ctx, &op_array->opcodes[i], &ssa->ops[i], ssa, 0); in dce_optimize_op_array()
586 add_operands_to_worklists(&ctx, &op_array->opcodes[op_data], &ssa->ops[op_data], ssa, 0); in dce_optimize_op_array()
588 …} else if (may_have_side_effects(op_array, ssa, &op_array->opcodes[i], &ssa->ops[i], ctx.reorder_d… in dce_optimize_op_array()
589 || (zend_may_throw(&op_array->opcodes[i], &ssa->ops[i], op_array, ssa) in dce_optimize_op_array()
590 && !may_throw_dce_exception(&op_array->opcodes[i])) in dce_optimize_op_array()
591 || (has_varargs && may_break_varargs(op_array, ssa, &ssa->ops[i]))) { in dce_optimize_op_array()
592 if (op_array->opcodes[i].opcode == ZEND_NEW in dce_optimize_op_array()
593 && op_array->opcodes[i+1].opcode == ZEND_DO_FCALL in dce_optimize_op_array()
599 add_operands_to_worklists(&ctx, &op_array->opcodes[i], &ssa->ops[i], ssa, 0); in dce_optimize_op_array()
601 add_operands_to_worklists(&ctx, &op_array->opcodes[op_data], &ssa->ops[op_data], ssa, 0); in dce_optimize_op_array()
619 add_operands_to_worklists(&ctx, &op_array->opcodes[i], &ssa->ops[i], ssa, 1); in dce_optimize_op_array()
620 if (i < op_array->last in dce_optimize_op_array()
621 && (op_array->opcodes[i+1].opcode == ZEND_OP_DATA in dce_optimize_op_array()
622 || (op_array->opcodes[i].opcode == ZEND_NEW in dce_optimize_op_array()
623 && op_array->opcodes[i+1].opcode == ZEND_DO_FCALL))) { in dce_optimize_op_array()
625 add_operands_to_worklists(&ctx, &op_array->opcodes[i+1], &ssa->ops[i+1], ssa, 1); in dce_optimize_op_array()
637 removed_ops += dce_instr(&ctx, &op_array->opcodes[i], &ssa->ops[i]); in dce_optimize_op_array()