Lines Matching refs:ssa_op
455 CHECK_OP_TRACE_TYPE(opline->op1.var, ssa_op->op1_use, op1_info, op1_type)
457 CHECK_OP_TRACE_TYPE(opline->op2.var, ssa_op->op2_use, op2_info, op2_type)
459 CHECK_OP_TRACE_TYPE((opline+1)->op1.var, (ssa_op+1)->op1_use, op1_data_info, op3_type)
982 static int find_return_ssa_var(zend_jit_trace_rec *p, zend_ssa_op *ssa_op) in find_return_ssa_var() argument
990 return ssa_op->result_def; in find_return_ssa_var()
2708 const zend_ssa_op *ssa_op; in zend_jit_trace_allocate_registers() local
2809 ssa_op = ssa->ops; in zend_jit_trace_allocate_registers()
2818 zend_jit_opline_supports_reg(op_array, ssa, opline, ssa_op, p); in zend_jit_trace_allocate_registers()
2823 && ssa_op->op1_def >= 0 in zend_jit_trace_allocate_registers()
2824 && ssa->vars[ssa_op->op1_def].alias != NO_ALIAS) { in zend_jit_trace_allocate_registers()
2829 if (ssa_op->op1_use >= 0 in zend_jit_trace_allocate_registers()
2830 && start[ssa_op->op1_use] >= 0 in zend_jit_trace_allocate_registers()
2831 && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { in zend_jit_trace_allocate_registers()
2833 …zend_jit_trace_use_var(idx, ssa_op->op1_use, ssa_op->op1_def, ssa_op->op1_use_chain, start, end, f… in zend_jit_trace_allocate_registers()
2849 flags[ssa_op->op1_use] |= ZREG_STORE; in zend_jit_trace_allocate_registers()
2851 flags[ssa_op->op1_use] |= ZREG_LAST_USE; in zend_jit_trace_allocate_registers()
2855 start[ssa_op->op1_use] = -1; in zend_jit_trace_allocate_registers()
2856 end[ssa_op->op1_use] = -1; in zend_jit_trace_allocate_registers()
2860 if (ssa_op->op2_use >= 0 in zend_jit_trace_allocate_registers()
2861 && ssa_op->op2_use != ssa_op->op1_use in zend_jit_trace_allocate_registers()
2862 && start[ssa_op->op2_use] >= 0 in zend_jit_trace_allocate_registers()
2863 && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op2_use)) { in zend_jit_trace_allocate_registers()
2865 …zend_jit_trace_use_var(idx, ssa_op->op2_use, ssa_op->op2_def, ssa_op->op2_use_chain, start, end, f… in zend_jit_trace_allocate_registers()
2867 flags[ssa_op->op2_use] |= ZREG_LAST_USE; in zend_jit_trace_allocate_registers()
2870 start[ssa_op->op2_use] = -1; in zend_jit_trace_allocate_registers()
2871 end[ssa_op->op2_use] = -1; in zend_jit_trace_allocate_registers()
2875 if (ssa_op->result_use >= 0 in zend_jit_trace_allocate_registers()
2876 && ssa_op->result_use != ssa_op->op1_use in zend_jit_trace_allocate_registers()
2877 && ssa_op->result_use != ssa_op->op2_use in zend_jit_trace_allocate_registers()
2878 && start[ssa_op->result_use] >= 0 in zend_jit_trace_allocate_registers()
2879 && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->result_use)) { in zend_jit_trace_allocate_registers()
2881 …zend_jit_trace_use_var(idx, ssa_op->result_use, ssa_op->result_def, ssa_op->res_use_chain, start, … in zend_jit_trace_allocate_registers()
2883 start[ssa_op->result_use] = -1; in zend_jit_trace_allocate_registers()
2884 end[ssa_op->result_use] = -1; in zend_jit_trace_allocate_registers()
2889 if (ssa_op->op1_def >= 0) { in zend_jit_trace_allocate_registers()
2891 SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); in zend_jit_trace_allocate_registers()
2893 if (ssa_op->op2_def >= 0) { in zend_jit_trace_allocate_registers()
2895 SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op2.var), ssa_op->op2_def); in zend_jit_trace_allocate_registers()
2897 if (ssa_op->result_def >= 0) { in zend_jit_trace_allocate_registers()
2899 SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->result.var), ssa_op->result_def); in zend_jit_trace_allocate_registers()
2903 if (ssa_op->result_def >= 0 in zend_jit_trace_allocate_registers()
2904 && (ssa->vars[ssa_op->result_def].use_chain >= 0 in zend_jit_trace_allocate_registers()
2905 || ssa->vars[ssa_op->result_def].phi_use_chain) in zend_jit_trace_allocate_registers()
2906 && ssa->vars[ssa_op->result_def].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2907 && zend_jit_var_supports_reg(ssa, ssa_op->result_def)) { in zend_jit_trace_allocate_registers()
2908 if (!(ssa->var_info[ssa_op->result_def].type & MAY_BE_GUARD) in zend_jit_trace_allocate_registers()
2918 if (!(ssa->var_info[ssa_op->result_def].type & MAY_BE_DOUBLE) in zend_jit_trace_allocate_registers()
2920 start[ssa_op->result_def] = idx; in zend_jit_trace_allocate_registers()
2921 vars_op_array[ssa_op->result_def] = op_array; in zend_jit_trace_allocate_registers()
2926 if (ssa_op->op1_def >= 0 in zend_jit_trace_allocate_registers()
2927 && (ssa->vars[ssa_op->op1_def].use_chain >= 0 in zend_jit_trace_allocate_registers()
2928 || ssa->vars[ssa_op->op1_def].phi_use_chain) in zend_jit_trace_allocate_registers()
2929 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2930 && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { in zend_jit_trace_allocate_registers()
2931 start[ssa_op->op1_def] = idx; in zend_jit_trace_allocate_registers()
2932 vars_op_array[ssa_op->op1_def] = op_array; in zend_jit_trace_allocate_registers()
2935 if (ssa_op->op2_def >= 0 in zend_jit_trace_allocate_registers()
2936 && (ssa->vars[ssa_op->op2_def].use_chain >= 0 in zend_jit_trace_allocate_registers()
2937 || ssa->vars[ssa_op->op2_def].phi_use_chain) in zend_jit_trace_allocate_registers()
2938 && ssa->vars[ssa_op->op2_def].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2939 && zend_jit_var_supports_reg(ssa, ssa_op->op2_def)) { in zend_jit_trace_allocate_registers()
2940 start[ssa_op->op2_def] = idx; in zend_jit_trace_allocate_registers()
2941 vars_op_array[ssa_op->op2_def] = op_array; in zend_jit_trace_allocate_registers()
2957 ssa_op++; in zend_jit_trace_allocate_registers()
2959 if (ssa_op->op1_use >= 0 in zend_jit_trace_allocate_registers()
2960 && start[ssa_op->op1_use] >= 0 in zend_jit_trace_allocate_registers()
2961 && !zend_ssa_is_no_val_use(opline, ssa_op, ssa_op->op1_use)) { in zend_jit_trace_allocate_registers()
2963 …zend_jit_trace_use_var(idx, ssa_op->op1_use, ssa_op->op1_def, ssa_op->op1_use_chain, start, end, f… in zend_jit_trace_allocate_registers()
2965 flags[ssa_op->op1_use] |= ZREG_LAST_USE; in zend_jit_trace_allocate_registers()
2968 start[ssa_op->op1_use] = -1; in zend_jit_trace_allocate_registers()
2969 end[ssa_op->op1_use] = -1; in zend_jit_trace_allocate_registers()
2973 if (ssa_op->op1_def >= 0) { in zend_jit_trace_allocate_registers()
2975 SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); in zend_jit_trace_allocate_registers()
2977 && (ssa->vars[ssa_op->op1_def].use_chain >= 0 in zend_jit_trace_allocate_registers()
2978 || ssa->vars[ssa_op->op1_def].phi_use_chain) in zend_jit_trace_allocate_registers()
2979 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2980 && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { in zend_jit_trace_allocate_registers()
2981 start[ssa_op->op1_def] = idx; in zend_jit_trace_allocate_registers()
2982 vars_op_array[ssa_op->op1_def] = op_array; in zend_jit_trace_allocate_registers()
2986 ssa_op++; in zend_jit_trace_allocate_registers()
2991 ssa_op++; in zend_jit_trace_allocate_registers()
2996 if (ssa_op->result_def >= 0) { in zend_jit_trace_allocate_registers()
2998 SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->result.var), ssa_op->result_def); in zend_jit_trace_allocate_registers()
3000 ssa_op++; in zend_jit_trace_allocate_registers()
3006 ssa_op++; in zend_jit_trace_allocate_registers()
3011 if (ssa_op->op1_def >= 0) { in zend_jit_trace_allocate_registers()
3013 SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->op1.var), ssa_op->op1_def); in zend_jit_trace_allocate_registers()
3015 ssa_op++; in zend_jit_trace_allocate_registers()
3021 ssa_op += len; in zend_jit_trace_allocate_registers()
3458 …k(zend_jit_trace_stack *stack, const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ssa *s… in zend_jit_trace_clenup_stack() argument
3460 uint32_t line = ssa_op - ssa->ops; in zend_jit_trace_clenup_stack()
3462 if (ssa_op->op1_use >= 0 in zend_jit_trace_clenup_stack()
3463 && ra[ssa_op->op1_use] in zend_jit_trace_clenup_stack()
3464 && ra[ssa_op->op1_use]->range.end == line) { in zend_jit_trace_clenup_stack()
3467 if (ssa_op->op2_use >= 0 in zend_jit_trace_clenup_stack()
3468 && ra[ssa_op->op2_use] in zend_jit_trace_clenup_stack()
3469 && ra[ssa_op->op2_use]->range.end == line) { in zend_jit_trace_clenup_stack()
3472 if (ssa_op->result_use >= 0 in zend_jit_trace_clenup_stack()
3473 && ra[ssa_op->result_use] in zend_jit_trace_clenup_stack()
3474 && ra[ssa_op->result_use]->range.end == line) { in zend_jit_trace_clenup_stack()
3495 …nst zend_op_array *op_array, zend_ssa *ssa, const zend_op **ssa_opcodes, const zend_ssa_op *ssa_op) in zend_jit_may_delay_fetch_this() argument
3497 int var = ssa_op->result_def; in zend_jit_may_delay_fetch_this()
3741 static void zend_jit_trace_update_condition_ranges(const zend_op *opline, const zend_ssa_op *ssa_op… in zend_jit_trace_update_condition_ranges() argument
3763 if (ssa_op->op1_use >= 0) { in zend_jit_trace_update_condition_ranges()
3765 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3769 if (ssa_op->op2_use >= 0) { in zend_jit_trace_update_condition_ranges()
3771 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3780 if (ssa_op->op1_use >= 0) { in zend_jit_trace_update_condition_ranges()
3782 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3786 if (ssa_op->op2_use >= 0) { in zend_jit_trace_update_condition_ranges()
3788 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3797 if (ssa_op->op1_use >= 0) { in zend_jit_trace_update_condition_ranges()
3799 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3803 if (ssa_op->op2_use >= 0) { in zend_jit_trace_update_condition_ranges()
3805 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3811 if (ssa_op->op1_use >= 0) { in zend_jit_trace_update_condition_ranges()
3813 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3817 if (ssa_op->op2_use >= 0) { in zend_jit_trace_update_condition_ranges()
3819 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3828 if (ssa_op->op1_use >= 0) { in zend_jit_trace_update_condition_ranges()
3830 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3834 if (ssa_op->op2_use >= 0) { in zend_jit_trace_update_condition_ranges()
3836 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3842 if (ssa_op->op1_use >= 0) { in zend_jit_trace_update_condition_ranges()
3844 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3848 if (ssa_op->op2_use >= 0) { in zend_jit_trace_update_condition_ranges()
3850 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3859 static bool zend_jit_may_skip_comparison(const zend_op *opline, const zend_ssa_op *ssa_op, const ze… in zend_jit_may_skip_comparison() argument
3866 if (ssa_op->op2_use >= 0) { in zend_jit_may_skip_comparison()
3867 if ((ssa_op-1)->op1_def == ssa_op->op2_use) { in zend_jit_may_skip_comparison()
3868 ssa_op--; in zend_jit_may_skip_comparison()
3869 opline = ssa_opcodes[ssa_op - ssa->ops]; in zend_jit_may_skip_comparison()
3877 } else if ((ssa_op-1)->result_def == ssa_op->op2_use) { in zend_jit_may_skip_comparison()
3878 ssa_op--; in zend_jit_may_skip_comparison()
3879 opline = ssa_opcodes[ssa_op - ssa->ops]; in zend_jit_may_skip_comparison()
3891 if (ssa_op->op1_use >= 0) { in zend_jit_may_skip_comparison()
3892 if ((ssa_op-1)->op1_def == ssa_op->op1_use) { in zend_jit_may_skip_comparison()
3893 ssa_op--; in zend_jit_may_skip_comparison()
3894 opline = ssa_opcodes[ssa_op - ssa->ops]; in zend_jit_may_skip_comparison()
3902 } else if ((ssa_op-1)->result_def == ssa_op->op1_use) { in zend_jit_may_skip_comparison()
3903 ssa_op--; in zend_jit_may_skip_comparison()
3904 opline = ssa_opcodes[ssa_op - ssa->ops]; in zend_jit_may_skip_comparison()
3914 const zend_ssa_op *prev_ssa_op = ssa_op - 1; in zend_jit_may_skip_comparison()
3925 if (ssa_op->op1_use == prev_ssa_op->op1_use in zend_jit_may_skip_comparison()
3926 && ssa_op->op2_use == prev_ssa_op->op2_use) { in zend_jit_may_skip_comparison()
3935 if (ssa_op->op1_use < 0) { in zend_jit_may_skip_comparison()
3940 if (ssa_op->op2_use < 0) { in zend_jit_may_skip_comparison()
4016 const zend_ssa_op *ssa_op, *orig_ssa_op; in zend_jit_trace() local
4288 ssa_op = (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) ? ssa->ops : NULL; in zend_jit_trace()
4379 … (op1_def_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow(opline, ssa_op, op_array, ssa), in zend_jit_trace()
4380 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4385 ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4387 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4393 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4432 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4450 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4453 if (ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
4454 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
4465 !ssa->var_info[ssa_op->op2_use].guarded_reference, 1)) { in zend_jit_trace()
4468 if (ssa->vars[ssa_op->op2_use].alias == NO_ALIAS) { in zend_jit_trace()
4469 ssa->var_info[ssa_op->op2_use].guarded_reference = 1; in zend_jit_trace()
4511 …) && (res_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow(opline, ssa_op, op_array, ssa), in zend_jit_trace()
4512 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4519 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4546 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4570 … (op1_def_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow(opline, ssa_op, op_array, ssa), in zend_jit_trace()
4571 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4577 ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4579 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4603 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4613 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4617 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4618 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4631 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info))) { in zend_jit_trace()
4655 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
4656 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
4668 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4676 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4680 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4681 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4690 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
4691 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
4700 } else if (ssa_op->op1_use >= 0 && ssa->vars[ssa_op->op1_use].definition >= 0) { in zend_jit_trace()
4701 on_this = ssa_opcodes[ssa->vars[ssa_op->op1_use].definition]->opcode == ZEND_FETCH_THIS; in zend_jit_trace()
4709 if (!zend_jit_incdec_obj(&dasm_state, opline, op_array, ssa, ssa_op, in zend_jit_trace()
4746 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
4747 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
4759 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4767 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4771 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4772 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4781 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
4782 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
4791 } else if (ssa_op->op1_use >= 0 && ssa->vars[ssa_op->op1_use].definition >= 0) { in zend_jit_trace()
4792 on_this = ssa_opcodes[ssa->vars[ssa_op->op1_use].definition]->opcode == ZEND_FETCH_THIS; in zend_jit_trace()
4802 if (!zend_jit_assign_obj_op(&dasm_state, opline, op_array, ssa, ssa_op, in zend_jit_trace()
4826 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
4827 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
4839 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4847 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4851 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4852 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4861 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
4862 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
4871 } else if (ssa_op->op1_use >= 0 && ssa->vars[ssa_op->op1_use].definition >= 0) { in zend_jit_trace()
4872 on_this = ssa_opcodes[ssa->vars[ssa_op->op1_use].definition]->opcode == ZEND_FETCH_THIS; in zend_jit_trace()
4882 if (!zend_jit_assign_obj(&dasm_state, opline, op_array, ssa, ssa_op, in zend_jit_trace()
4886 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4890 && (ssa_op+1)->op1_def >= 0 in zend_jit_trace()
4891 && ssa->vars[(ssa_op+1)->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4892 …ssa->var_info[(ssa_op+1)->op1_def].guarded_reference = ssa->var_info[(ssa_op+1)->op1_use].guarded_… in zend_jit_trace()
4909 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4919 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4923 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4924 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4935 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info))) { in zend_jit_trace()
4939 && (ssa_op+1)->op1_def >= 0 in zend_jit_trace()
4940 && ssa->vars[(ssa_op+1)->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4941 …ssa->var_info[(ssa_op+1)->op1_def].guarded_reference = ssa->var_info[(ssa_op+1)->op1_use].guarded_… in zend_jit_trace()
4951 … if (ssa_op->op2_def < 0 || (Z_MODE(op2_addr) == IS_REG && ssa->vars[ssa_op->op2_def].no_val)) { in zend_jit_trace()
4981 !ssa->var_info[ssa_op->op1_use].guarded_reference, 0)) { in zend_jit_trace()
4985 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4986 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
5034 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info))) { in zend_jit_trace()
5037 if (ssa_op->op2_def >= 0 in zend_jit_trace()
5039 && ssa->vars[ssa_op->op2_def].no_val) { in zend_jit_trace()
5044 && ssa->vars[ssa_op->op2_def].use_chain < 0 in zend_jit_trace()
5045 && !ssa->vars[ssa_op->op2_def].phi_use_chain) { in zend_jit_trace()
5053 && ssa_op->op2_def >= 0 in zend_jit_trace()
5054 && ssa->vars[ssa_op->op2_def].alias == NO_ALIAS) { in zend_jit_trace()
5055 …ssa->var_info[ssa_op->op2_def].guarded_reference = ssa->var_info[ssa_op->op2_use].guarded_referenc… in zend_jit_trace()
5065 … if (ssa_op->op1_def < 0 || (Z_MODE(op1_addr) == IS_REG && ssa->vars[ssa_op->op1_def].no_val)) { in zend_jit_trace()
5087 if (ssa_op->op1_def >= 0 in zend_jit_trace()
5089 && ssa->vars[ssa_op->op1_def].no_val) { in zend_jit_trace()
5094 && ssa->vars[ssa_op->op1_def].use_chain < 0 in zend_jit_trace()
5095 && !ssa->vars[ssa_op->op1_def].phi_use_chain) { in zend_jit_trace()
5103 && ssa_op->op1_def >= 0 in zend_jit_trace()
5104 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
5105 …ssa->var_info[ssa_op->op1_def].guarded_reference = ssa->var_info[ssa_op->op1_use].guarded_referenc… in zend_jit_trace()
5112 …? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, ssa, ssa_op, frame->call_level… in zend_jit_trace()
5154 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
5155 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
5173 … if (ssa_op->op1_def < 0 || (Z_MODE(op1_addr) == IS_REG && ssa->vars[ssa_op->op1_def].no_val)) { in zend_jit_trace()
5184 if (ssa_op->op1_def >= 0 in zend_jit_trace()
5186 && ssa->vars[ssa_op->op1_def].no_val) { in zend_jit_trace()
5191 && ssa->vars[ssa_op->op1_def].use_chain < 0 in zend_jit_trace()
5192 && !ssa->vars[ssa_op->op1_def].phi_use_chain) { in zend_jit_trace()
5200 && ssa_op->op1_def >= 0 in zend_jit_trace()
5201 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
5202 …ssa->var_info[ssa_op->op1_def].guarded_reference = ssa->var_info[ssa_op->op1_use].guarded_referenc… in zend_jit_trace()
5259 ssa_op != ssa->ops && in zend_jit_trace()
5262 zend_jit_may_skip_comparison(opline, ssa_op, ssa, ssa_opcodes, op_array); in zend_jit_trace()
5271 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5283 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5287 zend_jit_trace_update_condition_ranges(opline, ssa_op, op_array, ssa, exit_if_true); in zend_jit_trace()
5295 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5307 ssa_op != ssa->ops && in zend_jit_trace()
5310 zend_jit_may_skip_comparison(opline, ssa_op, ssa, ssa_opcodes, op_array); in zend_jit_trace()
5319 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5334 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5338 zend_jit_trace_update_condition_ranges(opline, ssa_op, op_array, ssa, exit_if_true); in zend_jit_trace()
5346 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5384 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5413 …if (!zend_jit_trace_handler(&dasm_state, op_array, opline, zend_may_throw(opline, ssa_op, op_array… in zend_jit_trace()
5482 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5517 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5553 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5568 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5572 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5573 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5644 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5648 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5649 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5650 if (ssa_op->op1_def >= 0) { in zend_jit_trace()
5651 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
5661 ssa_op->op1_use >= 0 && in zend_jit_trace()
5662 ssa->var_info[ssa_op->op1_use].avoid_refcounting; in zend_jit_trace()
5664 ssa->var_info[ssa_op->op1_use].type &= ~MAY_BE_PACKED_GUARD; in zend_jit_trace()
5674 … ssa->var_info[ssa_op->op1_use].type &= ~(MAY_BE_ARRAY_NUMERIC_HASH|MAY_BE_ARRAY_STRING_HASH); in zend_jit_trace()
5679 ssa->var_info[ssa_op->op1_use].type &= ~MAY_BE_ARRAY_PACKED; in zend_jit_trace()
5683 if (!zend_jit_fetch_dim_read(&dasm_state, opline, ssa, ssa_op, in zend_jit_trace()
5688 if (ssa_op->op1_def >= 0 && op1_type != IS_UNKNOWN) { in zend_jit_trace()
5689 ssa->var_info[ssa_op->op1_def].type = ssa->var_info[ssa_op->op1_use].type; in zend_jit_trace()
5707 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
5717 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5721 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
5722 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
5734 if (ssa_op->result_def >= 0 in zend_jit_trace()
5738 ssa->var_info[ssa_op->result_def].indirect_reference = 1; in zend_jit_trace()
5751 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5755 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5756 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5769 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5771 if (ssa_op->op1_use >= 0 in zend_jit_trace()
5772 && ssa->var_info[ssa_op->op1_use].avoid_refcounting) { in zend_jit_trace()
5793 ssa_op->op1_use >= 0 && in zend_jit_trace()
5794 ssa->var_info[ssa_op->op1_use].avoid_refcounting; in zend_jit_trace()
5796 ssa->var_info[ssa_op->op1_use].type &= ~MAY_BE_PACKED_GUARD; in zend_jit_trace()
5812 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info), in zend_jit_trace()
5857 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
5865 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5869 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5870 … ssa->var_info[ssa_op->op1_def >= 0 ? ssa_op->op1_def : ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5879 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
5880 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
5887 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
5888 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
5889 avoid_refcounting = ssa->var_info[ssa_op->op1_use].avoid_refcounting; in zend_jit_trace()
5893 } else if (ssa_op->op1_use >= 0 && ssa->vars[ssa_op->op1_use].definition >= 0) { in zend_jit_trace()
5894 on_this = ssa_opcodes[ssa->vars[ssa_op->op1_use].definition]->opcode == ZEND_FETCH_THIS; in zend_jit_trace()
5902 if (!zend_jit_fetch_obj(&dasm_state, opline, op_array, ssa, ssa_op, in zend_jit_trace()
5905 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, MAY_BE_STRING))) { in zend_jit_trace()
5911 orig_ssa_op = ssa_op; in zend_jit_trace()
5918 if (ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
5919 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
5926 ssa_op++; in zend_jit_trace()
5932 ssa_op = orig_ssa_op; in zend_jit_trace()
5941 orig_ssa_op = ssa_op; in zend_jit_trace()
5945 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
5950 ssa_op++; in zend_jit_trace()
5956 ssa_op = orig_ssa_op; in zend_jit_trace()
5962 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
5981 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5985 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5986 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
6003 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
6007 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
6008 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
6016 …tate, opline, op1_info, op1_addr, RES_REG_ADDR(), zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
6022 if (ssa_op->result_def >= 0 && opline->result_type != IS_CV) { in zend_jit_trace()
6023 if (zend_jit_may_delay_fetch_this(op_array, ssa, ssa_opcodes, ssa_op)) { in zend_jit_trace()
6024 ssa->var_info[ssa_op->result_def].delayed_fetch_this = 1; in zend_jit_trace()
6106 if (!zend_jit_fetch_constant(&dasm_state, opline, op_array, ssa, ssa_op, RES_REG_ADDR())) { in zend_jit_trace()
6133 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
6137 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
6138 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
6144 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
6145 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
6152 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
6153 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
6157 } else if (ssa_op->op1_use >= 0 && ssa->vars[ssa_op->op1_use].definition >= 0) { in zend_jit_trace()
6158 on_this = ssa_opcodes[ssa->vars[ssa_op->op1_use].definition]->opcode == ZEND_FETCH_THIS; in zend_jit_trace()
6169 op_array, ssa, ssa_op, frame->call_level, in zend_jit_trace()
6182 …? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, ssa, ssa_op, frame->call_level… in zend_jit_trace()
6221 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info), p + 1)) { in zend_jit_trace()
6249 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
6270 if (ssa_op) { in zend_jit_trace()
6274 if (ssa_op->result_def >= 0) { in zend_jit_trace()
6281 } else if (!(ssa->var_info[ssa_op->result_def].type & MAY_BE_GUARD) in zend_jit_trace()
6282 && has_concrete_type(ssa->var_info[ssa_op->result_def].type)) { in zend_jit_trace()
6283 type = concrete_type(ssa->var_info[ssa_op->result_def].type); in zend_jit_trace()
6291 && ssa_op->op1_use >= 0 in zend_jit_trace()
6293 && (ssa->var_info[ssa_op->op1_use].type & MAY_BE_REF) == 0) { in zend_jit_trace()
6312 (gen_handler || type == IS_UNKNOWN || !ra || !ra[ssa_op->result_def])); in zend_jit_trace()
6313 if (ssa->var_info[ssa_op->result_def].type & MAY_BE_INDIRECT) { in zend_jit_trace()
6317 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
6321 } else if (ssa->var_info[ssa_op->result_def].avoid_refcounting) { in zend_jit_trace()
6323 } else if (ra && ra[ssa_op->result_def]) { in zend_jit_trace()
6324 SET_STACK_REG_EX(stack, EX_VAR_TO_NUM(opline->result.var), ra[ssa_op->result_def]->reg, in zend_jit_trace()
6325 ra[ssa_op->result_def]->flags & ZREG_STORE); in zend_jit_trace()
6331 …rence_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->result_def, &… in zend_jit_trace()
6332 ssa->var_info[ssa_op->result_def].range.min = tmp.min; in zend_jit_trace()
6333 ssa->var_info[ssa_op->result_def].range.max = tmp.max; in zend_jit_trace()
6334 ssa->var_info[ssa_op->result_def].range.underflow = 0; in zend_jit_trace()
6335 ssa->var_info[ssa_op->result_def].range.overflow = 0; in zend_jit_trace()
6336 ssa->var_info[ssa_op->result_def].has_range = 1; in zend_jit_trace()
6339 if (ssa_op->op1_def >= 0 in zend_jit_trace()
6345 if (!(ssa->var_info[ssa_op->op1_def].type & MAY_BE_GUARD) in zend_jit_trace()
6346 && has_concrete_type(ssa->var_info[ssa_op->op1_def].type)) { in zend_jit_trace()
6347 type = concrete_type(ssa->var_info[ssa_op->op1_def].type); in zend_jit_trace()
6368 (!ra[ssa_op->op1_def] && in zend_jit_trace()
6369 !(ssa->vars[ssa_op->op1_def].no_val && in zend_jit_trace()
6378 ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
6379 if (ra && ra[ssa_op->op1_def]) { in zend_jit_trace()
6380 uint8_t flags = ra[ssa_op->op1_def]->flags & ZREG_STORE; in zend_jit_trace()
6382 if (ssa_op->op1_use >= 0) { in zend_jit_trace()
6390 if (!ra[ssa_op->op1_use]) { in zend_jit_trace()
6395 SET_STACK_REG_EX(stack, EX_VAR_TO_NUM(opline->op1.var), ra[ssa_op->op1_def]->reg, flags); in zend_jit_trace()
6399 …rence_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->op1_def, &tmp… in zend_jit_trace()
6400 ssa->var_info[ssa_op->op1_def].range.min = tmp.min; in zend_jit_trace()
6401 ssa->var_info[ssa_op->op1_def].range.max = tmp.max; in zend_jit_trace()
6402 ssa->var_info[ssa_op->op1_def].range.underflow = 0; in zend_jit_trace()
6403 ssa->var_info[ssa_op->op1_def].range.overflow = 0; in zend_jit_trace()
6404 ssa->var_info[ssa_op->op1_def].has_range = 1; in zend_jit_trace()
6407 if (ssa_op->op2_def >= 0 in zend_jit_trace()
6413 if (!(ssa->var_info[ssa_op->op2_def].type & MAY_BE_GUARD) in zend_jit_trace()
6414 && has_concrete_type(ssa->var_info[ssa_op->op2_def].type)) { in zend_jit_trace()
6415 type = concrete_type(ssa->var_info[ssa_op->op2_def].type); in zend_jit_trace()
6422 (!ra[ssa_op->op2_def] && in zend_jit_trace()
6423 !(ssa->vars[ssa_op->op2_def].no_val && in zend_jit_trace()
6427 ssa->var_info[ssa_op->op2_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
6428 if (ra && ra[ssa_op->op2_def]) { in zend_jit_trace()
6429 uint8_t flags = ra[ssa_op->op2_def]->flags & ZREG_STORE; in zend_jit_trace()
6431 if (ssa_op->op2_use >= 0) { in zend_jit_trace()
6433 if (!ra[ssa_op->op2_use] in zend_jit_trace()
6434 || ra[ssa_op->op2_use]->reg != ra[ssa_op->op2_def]->reg) { in zend_jit_trace()
6439 SET_STACK_REG_EX(stack, EX_VAR_TO_NUM(opline->op2.var), ra[ssa_op->op2_def]->reg, flags); in zend_jit_trace()
6443 …rence_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->op2_def, &tmp… in zend_jit_trace()
6444 ssa->var_info[ssa_op->op2_def].range.min = tmp.min; in zend_jit_trace()
6445 ssa->var_info[ssa_op->op2_def].range.max = tmp.max; in zend_jit_trace()
6446 ssa->var_info[ssa_op->op2_def].range.underflow = 0; in zend_jit_trace()
6447 ssa->var_info[ssa_op->op2_def].range.overflow = 0; in zend_jit_trace()
6448 ssa->var_info[ssa_op->op2_def].has_range = 1; in zend_jit_trace()
6462 ssa_op++; in zend_jit_trace()
6464 if (ssa_op->op1_def >= 0) { in zend_jit_trace()
6467 if (!(ssa->var_info[ssa_op->op1_def].type & MAY_BE_GUARD) in zend_jit_trace()
6468 && has_concrete_type(ssa->var_info[ssa_op->op1_def].type)) { in zend_jit_trace()
6469 type = concrete_type(ssa->var_info[ssa_op->op1_def].type); in zend_jit_trace()
6477 (gen_handler || type == IS_UNKNOWN || !ra || !ra[ssa_op->op1_def])); in zend_jit_trace()
6479 ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
6480 if (ra && ra[ssa_op->op1_def]) { in zend_jit_trace()
6481 SET_STACK_REG_EX(stack, EX_VAR_TO_NUM(opline->op1.var), ra[ssa_op->op1_def]->reg, in zend_jit_trace()
6482 ra[ssa_op->op1_def]->flags & ZREG_STORE); in zend_jit_trace()
6486 …rence_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->op1_def, &tmp… in zend_jit_trace()
6487 ssa->var_info[ssa_op->op1_def].range.min = tmp.min; in zend_jit_trace()
6488 ssa->var_info[ssa_op->op1_def].range.max = tmp.max; in zend_jit_trace()
6489 ssa->var_info[ssa_op->op1_def].range.underflow = 0; in zend_jit_trace()
6490 ssa->var_info[ssa_op->op1_def].range.overflow = 0; in zend_jit_trace()
6491 ssa->var_info[ssa_op->op1_def].has_range = 1; in zend_jit_trace()
6494 ssa_op++; in zend_jit_trace()
6497 ssa_op++; in zend_jit_trace()
6500 if (ssa_op->result_def >= 0) { in zend_jit_trace()
6503 if (!(ssa->var_info[ssa_op->result_def].type & MAY_BE_GUARD) in zend_jit_trace()
6504 && has_concrete_type(ssa->var_info[ssa_op->result_def].type)) { in zend_jit_trace()
6505 type = concrete_type(ssa->var_info[ssa_op->result_def].type); in zend_jit_trace()
6508 (gen_handler || !ra || !ra[ssa_op->result_def])); in zend_jit_trace()
6509 if (ra && ra[ssa_op->result_def]) { in zend_jit_trace()
6510 SET_STACK_REG_EX(stack, EX_VAR_TO_NUM(opline->result.var), ra[ssa_op->result_def]->reg, in zend_jit_trace()
6511 ra[ssa_op->result_def]->flags & ZREG_STORE); in zend_jit_trace()
6514 ssa_op++; in zend_jit_trace()
6519 ssa_op++; in zend_jit_trace()
6522 if (ssa_op->op1_def >= 0) { in zend_jit_trace()
6525 if (!(ssa->var_info[ssa_op->op1_def].type & MAY_BE_GUARD) in zend_jit_trace()
6526 && has_concrete_type(ssa->var_info[ssa_op->op1_def].type)) { in zend_jit_trace()
6527 type = concrete_type(ssa->var_info[ssa_op->op1_def].type); in zend_jit_trace()
6530 (gen_handler || !ra || !ra[ssa_op->op1_def])); in zend_jit_trace()
6531 if (ra && ra[ssa_op->op1_def]) { in zend_jit_trace()
6532 SET_STACK_REG_EX(stack, EX_VAR_TO_NUM(opline->op1.var), ra[ssa_op->op1_def]->reg, in zend_jit_trace()
6533 ra[ssa_op->op1_def]->flags & ZREG_STORE); in zend_jit_trace()
6536 ssa_op++; in zend_jit_trace()
6541 ssa_op += zend_jit_trace_op_len(opline); in zend_jit_trace()
6546 ssa_op++; in zend_jit_trace()
6705 && ssa_op in zend_jit_trace()
6706 && (ssa_op-1)->op1_use >=0 in zend_jit_trace()
6707 && ssa->var_info[(ssa_op-1)->op1_use].delayed_fetch_this)) in zend_jit_trace()