Lines Matching refs:ssa

368 …alias_kind zend_jit_var_may_alias(const zend_op_array *op_array, const zend_ssa *ssa, uint32_t var)  in zend_jit_var_may_alias()  argument
372 } else if ((!op_array->function_name || (ssa->cfg.flags & ZEND_FUNC_INDIRECT_VAR_ACCESS))) { in zend_jit_var_may_alias()
374 } else if (ssa->vars) { in zend_jit_var_may_alias()
375 return ssa->vars[var].alias; in zend_jit_var_may_alias()
409 if (ssa->vars[_ssa_var].alias != NO_ALIAS) { \
415 ssa->var_info[_ssa_var].type &= op_info; \
482 zend_ssa *ssa; in zend_jit_trace_build_ssa() local
491 memset(&jit_extension->func_info.ssa, 0, sizeof(zend_func_info) - offsetof(zend_func_info, ssa)); in zend_jit_trace_build_ssa()
492 ssa = &jit_extension->func_info.ssa; in zend_jit_trace_build_ssa()
496 if (zend_jit_op_array_analyze1(op_array, script, ssa) != SUCCESS) { in zend_jit_trace_build_ssa()
510 if (zend_jit_op_array_analyze2(op_array, script, ssa, 0) != SUCCESS) { in zend_jit_trace_build_ssa()
515 …mp_op_array(op_array, ZEND_DUMP_HIDE_UNREACHABLE|ZEND_DUMP_RC_INFERENCE|ZEND_DUMP_SSA, "JIT", ssa); in zend_jit_trace_build_ssa()
517 return ssa; in zend_jit_trace_build_ssa()
521 memset(ssa, 0, sizeof(zend_ssa)); in zend_jit_trace_build_ssa()
522 ssa->cfg.blocks_count = 1; in zend_jit_trace_build_ssa()
523 return ssa; in zend_jit_trace_build_ssa()
729 static int zend_jit_trace_copy_ssa_var_info(const zend_op_array *op_array, const zend_ssa *ssa, con… in zend_jit_trace_copy_ssa_var_info() argument
746 op = ssa->ops + (tssa_opcodes[use] - op_array->opcodes); in zend_jit_trace_copy_ssa_var_info()
748 no_val = ssa->vars[op->op1_use].no_val; in zend_jit_trace_copy_ssa_var_info()
749 alias = ssa->vars[op->op1_use].alias; in zend_jit_trace_copy_ssa_var_info()
750 info = ssa->var_info + op->op1_use; in zend_jit_trace_copy_ssa_var_info()
752 no_val = ssa->vars[op->op2_use].no_val; in zend_jit_trace_copy_ssa_var_info()
753 alias = ssa->vars[op->op2_use].alias; in zend_jit_trace_copy_ssa_var_info()
754 info = ssa->var_info + op->op2_use; in zend_jit_trace_copy_ssa_var_info()
756 no_val = ssa->vars[op->result_use].no_val; in zend_jit_trace_copy_ssa_var_info()
757 alias = ssa->vars[op->result_use].alias; in zend_jit_trace_copy_ssa_var_info()
758 info = ssa->var_info + op->result_use; in zend_jit_trace_copy_ssa_var_info()
771 static int zend_jit_trace_copy_ssa_var_range(const zend_op_array *op_array, const zend_ssa *ssa, co… in zend_jit_trace_copy_ssa_var_range() argument
782 op = ssa->ops + (tssa_opcodes[def] - op_array->opcodes); in zend_jit_trace_copy_ssa_var_range()
784 no_val = ssa->vars[op->op1_def].no_val; in zend_jit_trace_copy_ssa_var_range()
785 alias = ssa->vars[op->op1_def].alias; in zend_jit_trace_copy_ssa_var_range()
786 info = ssa->var_info + op->op1_def; in zend_jit_trace_copy_ssa_var_range()
788 no_val = ssa->vars[op->op2_def].no_val; in zend_jit_trace_copy_ssa_var_range()
789 alias = ssa->vars[op->op2_def].alias; in zend_jit_trace_copy_ssa_var_range()
790 info = ssa->var_info + op->op2_def; in zend_jit_trace_copy_ssa_var_range()
792 no_val = ssa->vars[op->result_def].no_val; in zend_jit_trace_copy_ssa_var_range()
793 alias = ssa->vars[op->result_def].alias; in zend_jit_trace_copy_ssa_var_range()
794 info = ssa->var_info + op->result_def; in zend_jit_trace_copy_ssa_var_range()
819 static int zend_jit_trace_restrict_ssa_var_info(const zend_op_array *op_array, const zend_ssa *ssa,… in zend_jit_trace_restrict_ssa_var_info() argument
828 op = ssa->ops + (tssa_opcodes[def] - op_array->opcodes); in zend_jit_trace_restrict_ssa_var_info()
830 info = ssa->var_info + op->op1_def; in zend_jit_trace_restrict_ssa_var_info()
832 info = ssa->var_info + op->op2_def; in zend_jit_trace_restrict_ssa_var_info()
834 info = ssa->var_info + op->result_def; in zend_jit_trace_restrict_ssa_var_info()
1063 zend_ssa ssa; member
1087 zend_ssa *ssa; in zend_jit_trace_build_tssa() local
1106 ssa = zend_jit_trace_build_ssa(op_array, script); in zend_jit_trace_build_tssa()
1114 ssa->cfg.flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS; in zend_jit_trace_build_tssa()
1125 ssa->cfg.flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS; in zend_jit_trace_build_tssa()
1128 ssa->cfg.flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS; in zend_jit_trace_build_tssa()
1146 ssa->cfg.flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS; in zend_jit_trace_build_tssa()
1171 ssa = &jit_extension->func_info.ssa; in zend_jit_trace_build_tssa()
1172 if (ssa->cfg.blocks_count) { in zend_jit_trace_build_tssa()
1182 ssa = zend_jit_trace_build_ssa(op_array, script); in zend_jit_trace_build_tssa()
1189 ssa = &jit_extension->func_info.ssa; in zend_jit_trace_build_tssa()
1190 if (ssa->cfg.blocks_count) { in zend_jit_trace_build_tssa()
1200 ssa = zend_jit_trace_build_ssa(op_array, script); in zend_jit_trace_build_tssa()
1412 ssa = &jit_extension->func_info.ssa; in zend_jit_trace_build_tssa()
1420 if (ssa->var_info in zend_jit_trace_build_tssa()
1421 && zend_jit_trace_copy_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, i)) { in zend_jit_trace_build_tssa()
1424 if (ssa->vars) { in zend_jit_trace_build_tssa()
1425 ssa_vars[i].no_val = ssa->vars[i].no_val; in zend_jit_trace_build_tssa()
1426 ssa_vars[i].alias = ssa->vars[i].alias; in zend_jit_trace_build_tssa()
1428 ssa_vars[i].alias = zend_jit_var_may_alias(op_array, ssa, i); in zend_jit_trace_build_tssa()
1446 if (ssa->vars) { in zend_jit_trace_build_tssa()
1447 ssa_vars[i].no_val = ssa->vars[i].no_val; in zend_jit_trace_build_tssa()
1448 ssa_vars[i].alias = ssa->vars[i].alias; in zend_jit_trace_build_tssa()
1450 ssa_vars[i].alias = zend_jit_var_may_alias(op_array, ssa, i); in zend_jit_trace_build_tssa()
1475 if (!ssa->var_info in zend_jit_trace_build_tssa()
1476 || !zend_jit_trace_copy_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, i)) { in zend_jit_trace_build_tssa()
1477 if (ssa->vars && i < ssa->vars_count) { in zend_jit_trace_build_tssa()
1478 ssa_vars[i].alias = ssa->vars[i].alias; in zend_jit_trace_build_tssa()
1480 ssa_vars[i].alias = zend_jit_var_may_alias(op_array, ssa, i); in zend_jit_trace_build_tssa()
1513 if (!ssa->var_info in zend_jit_trace_build_tssa()
1514 || !zend_jit_trace_copy_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, phi->ssa_var)) { in zend_jit_trace_build_tssa()
1958 if (ssa->var_info) { in zend_jit_trace_build_tssa()
1961 zend_jit_trace_copy_ssa_var_range(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].op1_def); in zend_jit_trace_build_tssa()
1964 zend_jit_trace_copy_ssa_var_range(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].op2_def); in zend_jit_trace_build_tssa()
1967 zend_jit_trace_copy_ssa_var_range(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].result_def); in zend_jit_trace_build_tssa()
1971 zend_jit_trace_copy_ssa_var_range(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx+1].op1_def); in zend_jit_trace_build_tssa()
1974 zend_jit_trace_copy_ssa_var_range(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx+1].op2_def); in zend_jit_trace_build_tssa()
1977 … zend_jit_trace_copy_ssa_var_range(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx+1].result_def); in zend_jit_trace_build_tssa()
1982 …ssa_vars[ssa_ops[idx].op1_def].alias = zend_jit_var_may_alias(op_array, ssa, EX_VAR_TO_NUM(opline-… in zend_jit_trace_build_tssa()
1985 …ssa_vars[ssa_ops[idx].op2_def].alias = zend_jit_var_may_alias(op_array, ssa, EX_VAR_TO_NUM(opline-… in zend_jit_trace_build_tssa()
1988 …ssa_vars[ssa_ops[idx].result_def].alias = zend_jit_var_may_alias(op_array, ssa, EX_VAR_TO_NUM(opli… in zend_jit_trace_build_tssa()
1992 …ssa_vars[ssa_ops[idx+1].op1_def].alias = zend_jit_var_may_alias(op_array, ssa, EX_VAR_TO_NUM((opli… in zend_jit_trace_build_tssa()
1995 …ssa_vars[ssa_ops[idx+1].op2_def].alias = zend_jit_var_may_alias(op_array, ssa, EX_VAR_TO_NUM((opli… in zend_jit_trace_build_tssa()
1998 …ssa_vars[ssa_ops[idx+1].result_def].alias = zend_jit_var_may_alias(op_array, ssa, EX_VAR_TO_NUM((o… in zend_jit_trace_build_tssa()
2017 if (ssa->var_info) { in zend_jit_trace_build_tssa()
2031 zend_jit_trace_restrict_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].op1_def); in zend_jit_trace_build_tssa()
2037 zend_jit_trace_restrict_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].op2_def); in zend_jit_trace_build_tssa()
2041 … zend_jit_trace_restrict_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].result_def); in zend_jit_trace_build_tssa()
2048 if (ssa->var_info) { in zend_jit_trace_build_tssa()
2051 zend_jit_trace_copy_ssa_var_range(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].op1_def); in zend_jit_trace_build_tssa()
2054 zend_jit_trace_copy_ssa_var_range(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].op2_def); in zend_jit_trace_build_tssa()
2057 zend_jit_trace_copy_ssa_var_range(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].result_def); in zend_jit_trace_build_tssa()
2061 …ssa_vars[ssa_ops[idx].op1_def].alias = zend_jit_var_may_alias(op_array, ssa, EX_VAR_TO_NUM(opline-… in zend_jit_trace_build_tssa()
2064 …ssa_vars[ssa_ops[idx].op2_def].alias = zend_jit_var_may_alias(op_array, ssa, EX_VAR_TO_NUM(opline-… in zend_jit_trace_build_tssa()
2067 …ssa_vars[ssa_ops[idx].result_def].alias = zend_jit_var_may_alias(op_array, ssa, EX_VAR_TO_NUM(opli… in zend_jit_trace_build_tssa()
2081 if (ssa->var_info) { in zend_jit_trace_build_tssa()
2084 zend_jit_trace_restrict_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].op1_def); in zend_jit_trace_build_tssa()
2087 zend_jit_trace_restrict_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].op2_def); in zend_jit_trace_build_tssa()
2090 … zend_jit_trace_restrict_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, ssa_ops[idx].result_def); in zend_jit_trace_build_tssa()
2101 ssa = &jit_extension->func_info.ssa; in zend_jit_trace_build_tssa()
2127 if (ssa->var_info in zend_jit_trace_build_tssa()
2128 && zend_jit_trace_copy_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, v)) { in zend_jit_trace_build_tssa()
2131 ssa_vars[v].alias = zend_jit_var_may_alias(op_array, ssa, i); in zend_jit_trace_build_tssa()
2148 if (ssa->vars) { in zend_jit_trace_build_tssa()
2149 ssa_vars[v].no_val = ssa->vars[i].no_val; in zend_jit_trace_build_tssa()
2150 ssa_vars[v].alias = ssa->vars[i].alias; in zend_jit_trace_build_tssa()
2152 ssa_vars[v].alias = zend_jit_var_may_alias(op_array, ssa, i); in zend_jit_trace_build_tssa()
2172 ssa = &jit_extension->func_info.ssa; in zend_jit_trace_build_tssa()
2178 if (!ssa->var_info in zend_jit_trace_build_tssa()
2179 || !zend_jit_trace_copy_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, v)) { in zend_jit_trace_build_tssa()
2187 if (!ssa->var_info in zend_jit_trace_build_tssa()
2188 || !zend_jit_trace_copy_ssa_var_info(op_array, ssa, ssa_opcodes, tssa, v)) { in zend_jit_trace_build_tssa()
2305 ssa = &jit_extension->func_info.ssa; in zend_jit_trace_build_tssa()
2392 … def, int use_chain, int *start, int *end, uint8_t *flags, const zend_ssa *ssa, const zend_op **ss… in zend_jit_trace_use_var() argument
2401 …} else if (use_chain >= 0 && !zend_ssa_is_no_val_use(ssa_opcodes[use_chain], ssa->ops + use_chain,… in zend_jit_trace_use_var()
2406 if (ssa->ops[line].op1_use == var) { in zend_jit_trace_use_var()
2410 } else if (ssa->ops[line].op2_use == var) { in zend_jit_trace_use_var()
2414 } else if (ssa->ops[line].result_use == var) { in zend_jit_trace_use_var()
2422 …d_jit_trace_allocate_registers(zend_jit_trace_rec *trace_buffer, zend_ssa *ssa, uint32_t parent_tr… in zend_jit_trace_allocate_registers() argument
2424 const zend_op **ssa_opcodes = ((zend_tssa*)ssa)->tssa_opcodes; in zend_jit_trace_allocate_registers()
2446 ZEND_ASSERT(ssa->var_info != NULL); in zend_jit_trace_allocate_registers()
2448 start = do_alloca(sizeof(int) * ssa->vars_count * 2 + in zend_jit_trace_allocate_registers()
2449 ZEND_MM_ALIGNED_SIZE(sizeof(uint8_t) * ssa->vars_count) + in zend_jit_trace_allocate_registers()
2450 ZEND_MM_ALIGNED_SIZE(sizeof(zend_op_array*) * ssa->vars_count), in zend_jit_trace_allocate_registers()
2455 end = start + ssa->vars_count; in zend_jit_trace_allocate_registers()
2456 flags = (uint8_t*)(end + ssa->vars_count); in zend_jit_trace_allocate_registers()
2457 …vars_op_array = (const zend_op_array**)(flags + ZEND_MM_ALIGNED_SIZE(sizeof(uint8_t) * ssa->vars_c… in zend_jit_trace_allocate_registers()
2459 memset(start, -1, sizeof(int) * ssa->vars_count * 2); in zend_jit_trace_allocate_registers()
2460 memset(flags, 0, sizeof(uint8_t) * ssa->vars_count); in zend_jit_trace_allocate_registers()
2461 memset(ZEND_VOIDP(vars_op_array), 0, sizeof(zend_op_array*) * ssa->vars_count); in zend_jit_trace_allocate_registers()
2466 op_array_ssa = &jit_extension->func_info.ssa; in zend_jit_trace_allocate_registers()
2483 if ((ssa->vars[i].use_chain >= 0 /*|| ssa->vars[i].phi_use_chain*/) in zend_jit_trace_allocate_registers()
2484 …&& !zend_ssa_is_no_val_use(ssa_opcodes[ssa->vars[i].use_chain], ssa->ops + ssa->vars[i].use_chain,… in zend_jit_trace_allocate_registers()
2485 && ssa->vars[i].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2486 && zend_jit_var_supports_reg(ssa, i)) { in zend_jit_trace_allocate_registers()
2513 zend_ssa_phi *phi = ssa->blocks[1].phis; in zend_jit_trace_allocate_registers()
2518 if (ssa->vars[phi->ssa_var].use_chain >= 0 in zend_jit_trace_allocate_registers()
2519 && ssa->vars[phi->ssa_var].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2520 && zend_jit_var_supports_reg(ssa, phi->ssa_var)) { in zend_jit_trace_allocate_registers()
2530 ssa_op = ssa->ops; in zend_jit_trace_allocate_registers()
2539 zend_jit_opline_supports_reg(op_array, ssa, opline, ssa_op, p); in zend_jit_trace_allocate_registers()
2545 && ssa->vars[ssa_op->op1_def].alias != NO_ALIAS) { in zend_jit_trace_allocate_registers()
2554 …sa_op->op1_use, ssa_op->op1_def, ssa_op->op1_use_chain, start, end, flags, ssa, ssa_opcodes, op_ar… in zend_jit_trace_allocate_registers()
2586 …sa_op->op2_use, ssa_op->op2_def, ssa_op->op2_use_chain, start, end, flags, ssa, ssa_opcodes, op_ar… in zend_jit_trace_allocate_registers()
2602 …>result_use, ssa_op->result_def, ssa_op->res_use_chain, start, end, flags, ssa, ssa_opcodes, op_ar… in zend_jit_trace_allocate_registers()
2625 && (ssa->vars[ssa_op->result_def].use_chain >= 0 in zend_jit_trace_allocate_registers()
2626 || ssa->vars[ssa_op->result_def].phi_use_chain) in zend_jit_trace_allocate_registers()
2627 && ssa->vars[ssa_op->result_def].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2628 && zend_jit_var_supports_reg(ssa, ssa_op->result_def)) { in zend_jit_trace_allocate_registers()
2629 if (!(ssa->var_info[ssa_op->result_def].type & MAY_BE_GUARD) in zend_jit_trace_allocate_registers()
2638 if (!(ssa->var_info[ssa_op->result_def].type & MAY_BE_DOUBLE) in zend_jit_trace_allocate_registers()
2647 && (ssa->vars[ssa_op->op1_def].use_chain >= 0 in zend_jit_trace_allocate_registers()
2648 || ssa->vars[ssa_op->op1_def].phi_use_chain) in zend_jit_trace_allocate_registers()
2649 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2650 && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { in zend_jit_trace_allocate_registers()
2656 && (ssa->vars[ssa_op->op2_def].use_chain >= 0 in zend_jit_trace_allocate_registers()
2657 || ssa->vars[ssa_op->op2_def].phi_use_chain) in zend_jit_trace_allocate_registers()
2658 && ssa->vars[ssa_op->op2_def].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2659 && zend_jit_var_supports_reg(ssa, ssa_op->op2_def)) { in zend_jit_trace_allocate_registers()
2683 …sa_op->op1_use, ssa_op->op1_def, ssa_op->op1_use_chain, start, end, flags, ssa, ssa_opcodes, op_ar… in zend_jit_trace_allocate_registers()
2697 && (ssa->vars[ssa_op->op1_def].use_chain >= 0 in zend_jit_trace_allocate_registers()
2698 || ssa->vars[ssa_op->op1_def].phi_use_chain) in zend_jit_trace_allocate_registers()
2699 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2700 && zend_jit_var_supports_reg(ssa, ssa_op->op1_def)) { in zend_jit_trace_allocate_registers()
2756 op_array_ssa = &jit_extension->func_info.ssa; in zend_jit_trace_allocate_registers()
2761 if (ssa->vars[j].use_chain >= 0 in zend_jit_trace_allocate_registers()
2762 && ssa->vars[j].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2763 && zend_jit_var_supports_reg(ssa, j)) { in zend_jit_trace_allocate_registers()
2782 op_array_ssa = &jit_extension->func_info.ssa; in zend_jit_trace_allocate_registers()
2793 if (ssa->vars[j].use_chain >= 0 in zend_jit_trace_allocate_registers()
2794 && ssa->vars[j].alias == NO_ALIAS in zend_jit_trace_allocate_registers()
2795 && zend_jit_var_supports_reg(ssa, j)) { in zend_jit_trace_allocate_registers()
2813 zend_ssa_phi *phi = ssa->blocks[1].phis; in zend_jit_trace_allocate_registers()
2817 if (start[i] >= 0 && !ssa->vars[phi->ssa_var].no_val) { in zend_jit_trace_allocate_registers()
2826 if (start[i] >= 0 && !ssa->vars[i].phi_use_chain) { in zend_jit_trace_allocate_registers()
2855 intervals = zend_arena_calloc(&CG(arena), ssa->vars_count, sizeof(zend_lifetime_interval)); in zend_jit_trace_allocate_registers()
2856 memset(intervals, 0, sizeof(zend_lifetime_interval*) * ssa->vars_count); in zend_jit_trace_allocate_registers()
2859 for (i = 0; i < ssa->vars_count; i++) { in zend_jit_trace_allocate_registers()
2864 end[i] == ssa->vars[i].use_chain) { in zend_jit_trace_allocate_registers()
2922 zend_ssa_phi *phi = ssa->blocks[1].phis; in zend_jit_trace_allocate_registers()
2927 && (ssa->var_info[phi->sources[1]].type & MAY_BE_ANY) == in zend_jit_trace_allocate_registers()
2928 (ssa->var_info[phi->ssa_var].type & MAY_BE_ANY)) { in zend_jit_trace_allocate_registers()
2936 for (i = 0; i < ssa->vars_count; i++) { in zend_jit_trace_allocate_registers()
2939 if (ssa->vars[i].definition >= 0) { in zend_jit_trace_allocate_registers()
2940 uint32_t line = ssa->vars[i].definition; in zend_jit_trace_allocate_registers()
2947 if (ssa->ops[line].op1_use >= 0 && in zend_jit_trace_allocate_registers()
2948 intervals[ssa->ops[line].op1_use] && in zend_jit_trace_allocate_registers()
2949 (i == ssa->ops[line].op1_def || in zend_jit_trace_allocate_registers()
2950 (i == ssa->ops[line].result_def && in zend_jit_trace_allocate_registers()
2951 (ssa->ops[line].op1_def < 0 || in zend_jit_trace_allocate_registers()
2952 !intervals[ssa->ops[line].op1_def])))) { in zend_jit_trace_allocate_registers()
2953 zend_jit_add_hint(intervals, i, ssa->ops[line].op1_use); in zend_jit_trace_allocate_registers()
2963 if (i == ssa->ops[line].op1_def && in zend_jit_trace_allocate_registers()
2964 ssa->ops[line].op1_use >= 0 && in zend_jit_trace_allocate_registers()
2965 intervals[ssa->ops[line].op1_use]) { in zend_jit_trace_allocate_registers()
2966 zend_jit_add_hint(intervals, i, ssa->ops[line].op1_use); in zend_jit_trace_allocate_registers()
2970 if (ssa->ops[line].op2_use >= 0 && in zend_jit_trace_allocate_registers()
2971 intervals[ssa->ops[line].op2_use] && in zend_jit_trace_allocate_registers()
2972 (i == ssa->ops[line].op2_def || in zend_jit_trace_allocate_registers()
2973 (i == ssa->ops[line].op1_def && in zend_jit_trace_allocate_registers()
2974 (ssa->ops[line].op2_def < 0 || in zend_jit_trace_allocate_registers()
2975 !intervals[ssa->ops[line].op2_def])) || in zend_jit_trace_allocate_registers()
2976 (i == ssa->ops[line].result_def && in zend_jit_trace_allocate_registers()
2977 (ssa->ops[line].op2_def < 0 || in zend_jit_trace_allocate_registers()
2978 !intervals[ssa->ops[line].op2_def]) && in zend_jit_trace_allocate_registers()
2979 (ssa->ops[line].op1_def < 0 || in zend_jit_trace_allocate_registers()
2980 !intervals[ssa->ops[line].op1_def])))) { in zend_jit_trace_allocate_registers()
2981 zend_jit_add_hint(intervals, i, ssa->ops[line].op2_use); in zend_jit_trace_allocate_registers()
2990 if (i == ssa->ops[line].result_def) { in zend_jit_trace_allocate_registers()
2991 if (ssa->ops[line].op1_use >= 0 && in zend_jit_trace_allocate_registers()
2992 intervals[ssa->ops[line].op1_use] && in zend_jit_trace_allocate_registers()
2993 ssa->ops[line].op1_use_chain < 0 && in zend_jit_trace_allocate_registers()
2994 !ssa->vars[ssa->ops[line].op1_use].phi_use_chain && in zend_jit_trace_allocate_registers()
2995 (ssa->var_info[i].type & MAY_BE_ANY) == in zend_jit_trace_allocate_registers()
2996 (ssa->var_info[ssa->ops[line].op1_use].type & MAY_BE_ANY)) { in zend_jit_trace_allocate_registers()
2998 zend_ssa_phi *phi = ssa->vars[ssa->ops[line].op1_use].definition_phi; in zend_jit_trace_allocate_registers()
3001 intervals[phi->sources[1]]->hint == intervals[ssa->ops[line].op1_use]) { in zend_jit_trace_allocate_registers()
3004 zend_jit_add_hint(intervals, i, ssa->ops[line].op1_use); in zend_jit_trace_allocate_registers()
3006 ssa->ops[line].op2_use >= 0 && in zend_jit_trace_allocate_registers()
3007 intervals[ssa->ops[line].op2_use] && in zend_jit_trace_allocate_registers()
3008 ssa->ops[line].op2_use_chain < 0 && in zend_jit_trace_allocate_registers()
3009 !ssa->vars[ssa->ops[line].op2_use].phi_use_chain && in zend_jit_trace_allocate_registers()
3010 (ssa->var_info[i].type & MAY_BE_ANY) == in zend_jit_trace_allocate_registers()
3011 (ssa->var_info[ssa->ops[line].op2_use].type & MAY_BE_ANY)) { in zend_jit_trace_allocate_registers()
3013 zend_ssa_phi *phi = ssa->vars[ssa->ops[line].op2_use].definition_phi; in zend_jit_trace_allocate_registers()
3016 intervals[phi->sources[1]]->hint == intervals[ssa->ops[line].op2_use]) { in zend_jit_trace_allocate_registers()
3019 zend_jit_add_hint(intervals, i, ssa->ops[line].op2_use); in zend_jit_trace_allocate_registers()
3028 list = zend_jit_sort_intervals(intervals, ssa->vars_count); in zend_jit_trace_allocate_registers()
3045 zend_jit_dump_lifetime_interval(vars_op_array[ival->ssa_var], ssa, ival); in zend_jit_trace_allocate_registers()
3052 list = zend_jit_linear_scan(&dummy_op_array, ssa_opcodes, ssa, list); in zend_jit_trace_allocate_registers()
3057 memset(intervals, 0, ssa->vars_count * sizeof(zend_lifetime_interval*)); in zend_jit_trace_allocate_registers()
3095 zend_ssa_phi *phi = ssa->blocks[1].phis; in zend_jit_trace_allocate_registers()
3105 && ssa->vars[def].use_chain >= 0 in zend_jit_trace_allocate_registers()
3106 && ssa->vars[def].use_chain == intervals[def]->range.end) { in zend_jit_trace_allocate_registers()
3113 if (ssa->vars[use].use_chain >= 0) { in zend_jit_trace_allocate_registers()
3134 && (!ssa->vars[def].no_val in zend_jit_trace_allocate_registers()
3135 || ssa->var_info[def].type != ssa->var_info[use].type)) { in zend_jit_trace_allocate_registers()
3136 if (ssa->vars[use].use_chain >= 0) { in zend_jit_trace_allocate_registers()
3146 for (i = 0; i < ssa->vars_count; i++) { in zend_jit_trace_allocate_registers()
3162 for (i = 0; i < ssa->vars_count; i++) { in zend_jit_trace_allocate_registers()
3165 zend_jit_dump_lifetime_interval(vars_op_array[ival->ssa_var], ssa, ival); in zend_jit_trace_allocate_registers()
3178 … *stack, const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ssa *ssa, zend_lifetime_inte… in zend_jit_trace_clenup_stack() argument
3180 uint32_t line = ssa_op - ssa->ops; in zend_jit_trace_clenup_stack()
3215 static zend_bool zend_jit_may_delay_fetch_this(const zend_op_array *op_array, zend_ssa *ssa, const … in zend_jit_may_delay_fetch_this() argument
3219 int use = ssa->vars[var].use_chain; in zend_jit_may_delay_fetch_this()
3223 || ssa->vars[var].phi_use_chain in zend_jit_may_delay_fetch_this()
3224 || ssa->ops[use].op1_use != var in zend_jit_may_delay_fetch_this()
3225 || ssa->ops[use].op1_use_chain != -1) { in zend_jit_may_delay_fetch_this()
3271 for (i = ssa->vars[var].definition; i < use; i++) { in zend_jit_may_delay_fetch_this()
3317 zend_ssa *ssa, in zend_jit_trace_deoptimization() argument
3332 if (ssa && ssa->vars[i].no_val) { in zend_jit_trace_deoptimization()
3367 if (ssa && ssa->vars[i].no_val) { in zend_jit_trace_deoptimization()
3395 ssa->var_info[i].delayed_fetch_this = 1; in zend_jit_trace_deoptimization()
3461 …pline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, zend_ssa *ssa, zend_bool exit_if_… in zend_jit_trace_update_condition_ranges() argument
3485 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3491 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3502 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3508 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3519 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3525 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3533 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3539 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3550 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3556 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3564 &ssa->var_info[ssa_op->op1_use], in zend_jit_trace_update_condition_ranges()
3570 &ssa->var_info[ssa_op->op2_use], in zend_jit_trace_update_condition_ranges()
3579 …mparison(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_ssa *ssa, const zend_op **ss… in zend_jit_may_skip_comparison() argument
3589 opline = ssa_opcodes[ssa_op - ssa->ops]; in zend_jit_may_skip_comparison()
3599 opline = ssa_opcodes[ssa_op - ssa->ops]; in zend_jit_may_skip_comparison()
3614 opline = ssa_opcodes[ssa_op - ssa->ops]; in zend_jit_may_skip_comparison()
3624 opline = ssa_opcodes[ssa_op - ssa->ops]; in zend_jit_may_skip_comparison()
3635 prev_opcode = ssa_opcodes[prev_ssa_op - ssa->ops]->opcode; in zend_jit_may_skip_comparison()
3638 && prev_ssa_op != ssa->ops in zend_jit_may_skip_comparison()
3642 prev_opcode = ssa_opcodes[prev_ssa_op - ssa->ops]->opcode; in zend_jit_may_skip_comparison()
3656 … opline->op1) != RT_CONSTANT(&ssa_opcodes[prev_ssa_op - ssa->ops], ssa_opcodes[prev_ssa_op - ssa->… in zend_jit_may_skip_comparison()
3661 … opline->op2) != RT_CONSTANT(&ssa_opcodes[prev_ssa_op - ssa->ops], ssa_opcodes[prev_ssa_op - ssa->… in zend_jit_may_skip_comparison()
3681 zend_ssa *ssa, *op_array_ssa; in zend_jit_trace() local
3714ssa = zend_jit_trace_build_tssa(trace_buffer, parent_trace, exit_num, script, op_arrays, &num_op_a… in zend_jit_trace()
3716 if (!ssa) { in zend_jit_trace()
3720 ssa_opcodes = ((zend_tssa*)ssa)->tssa_opcodes; in zend_jit_trace()
3721 used_stack = ((zend_tssa*)ssa)->used_stack; in zend_jit_trace()
3726 ra = zend_jit_trace_allocate_registers(trace_buffer, ssa, parent_trace, exit_num); in zend_jit_trace()
3750 op_array_ssa = &jit_extension->func_info.ssa; in zend_jit_trace()
3799 uint32_t info = ssa->var_info[i].type; in zend_jit_trace()
3815 } else if (ssa->vars[i].alias != NO_ALIAS) { in zend_jit_trace()
3828 && (ssa->vars[i].use_chain != -1 in zend_jit_trace()
3829 || (ssa->vars[i].phi_use_chain in zend_jit_trace()
3830 && !(ssa->var_info[ssa->vars[i].phi_use_chain->ssa_var].type & MAY_BE_GUARD)))) { in zend_jit_trace()
3836 ssa->var_info[i].type = info; in zend_jit_trace()
3850 && ssa->vars[i].use_chain != -1) { in zend_jit_trace()
3855 ssa->var_info[i].type = info; in zend_jit_trace()
3864 parent_stack, parent_vars_count, ssa, stack, ra, in zend_jit_trace()
3878 if ((ssa->var_info[i].type & MAY_BE_GUARD) != 0) { in zend_jit_trace()
3881 ssa->var_info[i].type &= ~MAY_BE_GUARD; in zend_jit_trace()
3882 op_type = concrete_type(ssa->var_info[i].type); in zend_jit_trace()
3890 if (!zend_jit_load_var(&dasm_state, ssa->var_info[i].type, i, ra[i]->reg)) { in zend_jit_trace()
3905 zend_ssa_phi *phi = ssa->blocks[1].phis; in zend_jit_trace()
3912 uint32_t info = ssa->var_info[phi->ssa_var].type; in zend_jit_trace()
3920 ssa->var_info[phi->ssa_var].type = info; in zend_jit_trace()
3924 …if (!zend_jit_load_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var,… in zend_jit_trace()
3931 …if (!zend_jit_store_var(&dasm_state, ssa->var_info[phi->ssa_var].type, ssa->vars[phi->ssa_var].var… in zend_jit_trace()
3932 STACK_MEM_TYPE(stack, phi->var) != ssa->var_info[phi->ssa_var].type)) { in zend_jit_trace()
3964 if (!zend_jit_load_var(&dasm_state, ssa->var_info[i].type, i, ra[i]->reg)) { in zend_jit_trace()
3972 ssa_op = (JIT_G(opt_level) >= ZEND_JIT_LEVEL_INLINE) ? ssa->ops : NULL; in zend_jit_trace()
4069 … (op1_def_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow(opline, ssa_op, op_array, ssa), in zend_jit_trace()
4070 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4075 ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4077 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4083 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4160 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4249 …) && (res_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow(opline, ssa_op, op_array, ssa), in zend_jit_trace()
4250 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4257 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4312 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4336 … (op1_def_info & (MAY_BE_DOUBLE|MAY_BE_GUARD)) && zend_may_overflow(opline, ssa_op, op_array, ssa), in zend_jit_trace()
4337 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4343 ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4345 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
4369 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4379 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4383 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4384 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4397 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info))) { in zend_jit_trace()
4421 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
4433 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4441 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4445 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4446 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4454 if (ssa->var_info && ssa->ops) { in zend_jit_trace()
4456 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
4464 if (!zend_jit_incdec_obj(&dasm_state, opline, op_array, ssa, ssa_op, in zend_jit_trace()
4467 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4501 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
4513 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4521 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4525 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4526 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4534 if (ssa->var_info && ssa->ops) { in zend_jit_trace()
4536 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
4546 if (!zend_jit_assign_obj_op(&dasm_state, opline, op_array, ssa, ssa_op, in zend_jit_trace()
4549 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4570 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
4582 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4590 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4594 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4595 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4603 if (ssa->var_info && ssa->ops) { in zend_jit_trace()
4605 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
4615 if (!zend_jit_assign_obj(&dasm_state, opline, op_array, ssa, ssa_op, in zend_jit_trace()
4618 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
4623 && ssa->vars[(ssa_op+1)->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4624ssa->var_info[(ssa_op+1)->op1_def].guarded_reference = ssa->var_info[(ssa_op+1)->op1_use].guarded_… in zend_jit_trace()
4641 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
4651 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
4655 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4656 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4667 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info))) { in zend_jit_trace()
4672 && ssa->vars[(ssa_op+1)->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4673ssa->var_info[(ssa_op+1)->op1_def].guarded_reference = ssa->var_info[(ssa_op+1)->op1_use].guarded_… in zend_jit_trace()
4684 && (!ssa->vars[ssa_op->op2_def].no_val in zend_jit_trace()
4706 !ssa->var_info[ssa_op->op1_use].guarded_reference, 0)) { in zend_jit_trace()
4710 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4711 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4778 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info))) { in zend_jit_trace()
4783 && ssa->vars[ssa_op->op2_def].alias == NO_ALIAS) { in zend_jit_trace()
4784ssa->var_info[ssa_op->op2_def].guarded_reference = ssa->var_info[ssa_op->op2_use].guarded_referenc… in zend_jit_trace()
4796 && !ssa->vars[ssa_op->op1_def].no_val) { in zend_jit_trace()
4825 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4826ssa->var_info[ssa_op->op1_def].guarded_reference = ssa->var_info[ssa_op->op1_use].guarded_referenc… in zend_jit_trace()
4833 …fg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, ssa, ssa_op, frame->cal… in zend_jit_trace()
4877 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4878 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
4898 && !ssa->vars[ssa_op->op1_def].no_val) { in zend_jit_trace()
4911 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
4912ssa->var_info[ssa_op->op1_def].guarded_reference = ssa->var_info[ssa_op->op1_use].guarded_referenc… in zend_jit_trace()
4971 ssa_op != ssa->ops && in zend_jit_trace()
4974 zend_jit_may_skip_comparison(opline, ssa_op, ssa, ssa_opcodes, op_array); in zend_jit_trace()
4983 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
4995 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
4999 zend_jit_trace_update_condition_ranges(opline, ssa_op, op_array, ssa, exit_if_true); in zend_jit_trace()
5007 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5019 ssa_op != ssa->ops && in zend_jit_trace()
5022 zend_jit_may_skip_comparison(opline, ssa_op, ssa, ssa_opcodes, op_array); in zend_jit_trace()
5031 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5046 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5050 zend_jit_trace_update_condition_ranges(opline, ssa_op, op_array, ssa, exit_if_true); in zend_jit_trace()
5058 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5096 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5125 …ace_handler(&dasm_state, op_array, opline, zend_may_throw(opline, ssa_op, op_array, ssa), p + 1)) { in zend_jit_trace()
5185 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5225 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5254 zend_may_throw(opline, ssa_op, op_array, ssa), in zend_jit_trace()
5269 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5273 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5274 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5345 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5349 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5350 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5360 ssa->var_info[ssa_op->op1_use].avoid_refcounting; in zend_jit_trace()
5362 ssa->var_info[ssa_op->op1_use].type &= ~MAY_BE_PACKED_GUARD; in zend_jit_trace()
5375 if (!zend_jit_fetch_dim_read(&dasm_state, opline, ssa, ssa_op, in zend_jit_trace()
5409 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
5419 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5423 && ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
5424 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
5440 && !ssa->var_info[ssa_op->op1_use].indirect_reference)))) { in zend_jit_trace()
5447 ssa->var_info[ssa_op->result_def].indirect_reference = 1; in zend_jit_trace()
5460 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5464 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5465 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5478 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5481 && ssa->var_info[ssa_op->op1_use].avoid_refcounting) { in zend_jit_trace()
5503 ssa->var_info[ssa_op->op1_use].avoid_refcounting; in zend_jit_trace()
5505 ssa->var_info[ssa_op->op1_use].type &= ~MAY_BE_PACKED_GUARD; in zend_jit_trace()
5521 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info), in zend_jit_trace()
5565 &op1_info, &op1_addr, !ssa->var_info[ssa_op->op1_use].indirect_reference)) { in zend_jit_trace()
5573 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5577 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5578ssa->var_info[ssa_op->op1_def >= 0 ? ssa_op->op1_def : ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5586 if (ssa->var_info && ssa->ops) { in zend_jit_trace()
5588 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
5596 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
5597 avoid_refcounting = ssa->var_info[ssa_op->op1_use].avoid_refcounting; in zend_jit_trace()
5600 if (!zend_jit_fetch_obj(&dasm_state, opline, op_array, ssa, ssa_op, in zend_jit_trace()
5603 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, MAY_BE_STRING))) { in zend_jit_trace()
5611 if (!ssa->ops || !ssa->var_info) { in zend_jit_trace()
5616 if (ssa->vars[ssa_op->op1_def].alias == NO_ALIAS) { in zend_jit_trace()
5617 ssa->var_info[ssa_op->op1_def].guarded_reference = 1; in zend_jit_trace()
5643 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
5660 zend_may_throw(opline, ssa_op, op_array, ssa))) { in zend_jit_trace()
5679 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5683 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5684 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5699 if (zend_jit_may_delay_fetch_this(op_array, ssa, ssa_opcodes, ssa_op)) { in zend_jit_trace()
5700 ssa->var_info[ssa_op->result_def].delayed_fetch_this = 1; in zend_jit_trace()
5782 if (!zend_jit_fetch_constant(&dasm_state, opline, op_array, ssa, ssa_op)) { in zend_jit_trace()
5808 !ssa->var_info[ssa_op->op1_use].guarded_reference, 1)) { in zend_jit_trace()
5812 && ssa->vars[ssa_op->op1_use].alias == NO_ALIAS) { in zend_jit_trace()
5813 ssa->var_info[ssa_op->op1_use].guarded_reference = 1; in zend_jit_trace()
5818 if (ssa->var_info && ssa->ops) { in zend_jit_trace()
5820 zend_ssa_var_info *op1_ssa = ssa->var_info + ssa_op->op1_use; in zend_jit_trace()
5828 delayed_fetch_this = ssa->var_info[ssa_op->op1_use].delayed_fetch_this; in zend_jit_trace()
5834 op_array, ssa, ssa_op, frame->call_level, in zend_jit_trace()
5847 …fg.map ? op_array_ssa->cfg.map[opline - op_array->opcodes] : -1, op_array, ssa, ssa_op, frame->cal… in zend_jit_trace()
5853 …ace_handler(&dasm_state, op_array, opline, zend_may_throw(opline, ssa_op, op_array, ssa), p + 1)) { in zend_jit_trace()
5866 …ace_handler(&dasm_state, op_array, opline, zend_may_throw(opline, ssa_op, op_array, ssa), p + 1)) { in zend_jit_trace()
5877 …ace_handler(&dasm_state, op_array, opline, zend_may_throw(opline, ssa_op, op_array, ssa), p + 1)) { in zend_jit_trace()
5910 zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info), p + 1)) { in zend_jit_trace()
5926 zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra); in zend_jit_trace()
5958 } else if (!(ssa->var_info[ssa_op->result_def].type & MAY_BE_GUARD) in zend_jit_trace()
5959 && has_concrete_type(ssa->var_info[ssa_op->result_def].type)) { in zend_jit_trace()
5960 type = concrete_type(ssa->var_info[ssa_op->result_def].type); in zend_jit_trace()
5970 && (ssa->var_info[ssa_op->op1_use].type & MAY_BE_REF) == 0) { in zend_jit_trace()
5990 if (ssa->var_info[ssa_op->result_def].type & MAY_BE_INDIRECT) { in zend_jit_trace()
5994 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
5998 } else if (ssa->var_info[ssa_op->result_def].avoid_refcounting) { in zend_jit_trace()
6008 …&& zend_inference_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->r… in zend_jit_trace()
6009 ssa->var_info[ssa_op->result_def].range.min = tmp.min; in zend_jit_trace()
6010 ssa->var_info[ssa_op->result_def].range.max = tmp.max; in zend_jit_trace()
6011 ssa->var_info[ssa_op->result_def].range.underflow = 0; in zend_jit_trace()
6012 ssa->var_info[ssa_op->result_def].range.overflow = 0; in zend_jit_trace()
6013 ssa->var_info[ssa_op->result_def].has_range = 1; in zend_jit_trace()
6022 if (!(ssa->var_info[ssa_op->op1_def].type & MAY_BE_GUARD) in zend_jit_trace()
6023 && has_concrete_type(ssa->var_info[ssa_op->op1_def].type)) { in zend_jit_trace()
6024 type = concrete_type(ssa->var_info[ssa_op->op1_def].type); in zend_jit_trace()
6046 (opline->opcode == ZEND_ASSIGN || !ssa->vars[ssa_op->op1_def].no_val)))); in zend_jit_trace()
6048 ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
6069 …&& zend_inference_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->o… in zend_jit_trace()
6070 ssa->var_info[ssa_op->op1_def].range.min = tmp.min; in zend_jit_trace()
6071 ssa->var_info[ssa_op->op1_def].range.max = tmp.max; in zend_jit_trace()
6072 ssa->var_info[ssa_op->op1_def].range.underflow = 0; in zend_jit_trace()
6073 ssa->var_info[ssa_op->op1_def].range.overflow = 0; in zend_jit_trace()
6074 ssa->var_info[ssa_op->op1_def].has_range = 1; in zend_jit_trace()
6083 if (!(ssa->var_info[ssa_op->op2_def].type & MAY_BE_GUARD) in zend_jit_trace()
6084 && has_concrete_type(ssa->var_info[ssa_op->op2_def].type)) { in zend_jit_trace()
6085 type = concrete_type(ssa->var_info[ssa_op->op2_def].type); in zend_jit_trace()
6092 (!ra[ssa_op->op2_def] && !ssa->vars[ssa_op->op2_def].no_val))); in zend_jit_trace()
6094 ssa->var_info[ssa_op->op2_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
6110 …&& zend_inference_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->o… in zend_jit_trace()
6111 ssa->var_info[ssa_op->op2_def].range.min = tmp.min; in zend_jit_trace()
6112 ssa->var_info[ssa_op->op2_def].range.max = tmp.max; in zend_jit_trace()
6113 ssa->var_info[ssa_op->op2_def].range.underflow = 0; in zend_jit_trace()
6114 ssa->var_info[ssa_op->op2_def].range.overflow = 0; in zend_jit_trace()
6115 ssa->var_info[ssa_op->op2_def].has_range = 1; in zend_jit_trace()
6134 if (!(ssa->var_info[ssa_op->op1_def].type & MAY_BE_GUARD) in zend_jit_trace()
6135 && has_concrete_type(ssa->var_info[ssa_op->op1_def].type)) { in zend_jit_trace()
6136 type = concrete_type(ssa->var_info[ssa_op->op1_def].type); in zend_jit_trace()
6146 ssa->var_info[ssa_op->op1_def].type &= ~MAY_BE_GUARD; in zend_jit_trace()
6153 …&& zend_inference_propagate_range(op_array, ssa, (zend_op*)opline, (zend_ssa_op*)ssa_op, ssa_op->o… in zend_jit_trace()
6154 ssa->var_info[ssa_op->op1_def].range.min = tmp.min; in zend_jit_trace()
6155 ssa->var_info[ssa_op->op1_def].range.max = tmp.max; in zend_jit_trace()
6156 ssa->var_info[ssa_op->op1_def].range.underflow = 0; in zend_jit_trace()
6157 ssa->var_info[ssa_op->op1_def].range.overflow = 0; in zend_jit_trace()
6158 ssa->var_info[ssa_op->op1_def].has_range = 1; in zend_jit_trace()
6170 if (!(ssa->var_info[ssa_op->result_def].type & MAY_BE_GUARD) in zend_jit_trace()
6171 && has_concrete_type(ssa->var_info[ssa_op->result_def].type)) { in zend_jit_trace()
6172 type = concrete_type(ssa->var_info[ssa_op->result_def].type); in zend_jit_trace()
6192 if (!(ssa->var_info[ssa_op->op1_def].type & MAY_BE_GUARD) in zend_jit_trace()
6193 && has_concrete_type(ssa->var_info[ssa_op->op1_def].type)) { in zend_jit_trace()
6194 type = concrete_type(ssa->var_info[ssa_op->op1_def].type); in zend_jit_trace()
6258 op_array_ssa = &jit_extension->func_info.ssa; in zend_jit_trace()
6274 if (!zend_jit_load_var(&dasm_state, ssa->var_info[j].type, i, ra[j]->reg)) { in zend_jit_trace()
6284 op_array_ssa = &jit_extension->func_info.ssa; in zend_jit_trace()
6299 if (!(ssa->var_info[j].type & MAY_BE_GUARD) in zend_jit_trace()
6300 && has_concrete_type(ssa->var_info[j].type)) { in zend_jit_trace()
6301 SET_STACK_TYPE(stack, i, concrete_type(ssa->var_info[j].type), 1); in zend_jit_trace()
6311 if (!zend_jit_load_var(&dasm_state, ssa->var_info[j].type, i, ra[j]->reg)) { in zend_jit_trace()
6377 && zend_jit_var_may_alias(p->op_array, &jit_extension->func_info.ssa, i) != NO_ALIAS) { in zend_jit_trace()
6464 zend_ssa_phi *phi = ssa->blocks[1].phis; in zend_jit_trace()
6635 memset(&jit_extension->func_info.ssa, 0, sizeof(zend_func_info) - offsetof(zend_func_info, ssa)); in zend_jit_trace()