Lines Matching refs:ssa
283 zend_ssa *ssa; member
1290 if (jit->ssa->vars[var].var < jit->current_op_array->last_var) { in zend_jit_spilling_may_cause_conflict()
1297 …_base[jit->ctx.ir_base[val].op2].op2].val.addr != (uintptr_t)EX_NUM_TO_VAR(jit->ssa->vars[var].var) in zend_jit_spilling_may_cause_conflict()
1301 } else if (jit->ssa->vars[var].definition >= 0 in zend_jit_spilling_may_cause_conflict()
1302 && jit->ssa->ops[jit->ssa->vars[var].definition].op1_def == var in zend_jit_spilling_may_cause_conflict()
1303 && jit->ssa->ops[jit->ssa->vars[var].definition].op1_use >= 0 in zend_jit_spilling_may_cause_conflict()
1304 && jit->ssa->vars[jit->ssa->ops[jit->ssa->vars[var].definition].op1_use].no_val in zend_jit_spilling_may_cause_conflict()
1305 && jit->ssa->vars[jit->ssa->ops[jit->ssa->vars[var].definition].op1_use].definition_phi in zend_jit_spilling_may_cause_conflict()
1306 …&& (jit->ssa->cfg.blocks[jit->ssa->vars[jit->ssa->ops[jit->ssa->vars[var].definition].op1_use].def… in zend_jit_spilling_may_cause_conflict()
1329 val = ir_bind(&jit->ctx, -EX_NUM_TO_VAR(jit->ssa->vars[var].var), val); in zend_jit_def_reg()
1334 zend_ssa_phi *phi = jit->ssa->vars[var].phi_use_chain; in zend_jit_def_reg()
1348 phi = zend_ssa_next_use_phi(jit->ssa, var, phi); in zend_jit_def_reg()
1351 dst_phi = jit->ssa->vars[src_var].phi_use_chain; in zend_jit_def_reg()
1353 ZEND_ASSERT(!zend_ssa_next_use_phi(jit->ssa, src_var, dst_phi) && "reg forwarding"); in zend_jit_def_reg()
1361 bb = &jit->ssa->cfg.blocks[dst_phi->block]; in zend_jit_def_reg()
1371 phi = zend_ssa_next_use_phi(jit->ssa, var, phi); in zend_jit_def_reg()
1387 mem_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, EX_NUM_TO_VAR(jit->ssa->vars[var].var)); in zend_jit_use_reg()
1388 if ((jit->ssa->var_info[var].type & MAY_BE_ANY) == MAY_BE_LONG) { in zend_jit_use_reg()
1390 } else if ((jit->ssa->var_info[var].type & MAY_BE_ANY) == MAY_BE_DOUBLE) { in zend_jit_use_reg()
1412 if (jit->ssa->vars[dst_var].use_chain < 0 in zend_jit_gen_pi()
1413 && jit->ssa->vars[dst_var].phi_use_chain) { in zend_jit_gen_pi()
1414 zend_ssa_phi *phi = jit->ssa->vars[dst_var].phi_use_chain; in zend_jit_gen_pi()
1415 if (!zend_ssa_next_use_phi(jit->ssa, dst_var, phi)) { in zend_jit_gen_pi()
1431 zend_basic_block *bb = &jit->ssa->cfg.blocks[phi->block]; in zend_jit_gen_phi()
1434 ir_type type = (jit->ssa->var_info[phi->ssa_var].type & MAY_BE_LONG) ? IR_LONG : IR_DOUBLE; in zend_jit_gen_phi()
2721 jit->ssa = NULL; in zend_jit_init_ctx()
3445 bb = &jit->ssa->cfg.blocks[b]; in _zend_jit_add_predecessor_ref()
3446 p = &jit->ssa->cfg.predecessors[bb->predecessor_offset]; in _zend_jit_add_predecessor_ref()
3530 count = jit->ssa->cfg.blocks_count; in _zend_jit_fix_merges()
3599 zend_basic_block *bb = &jit->ssa->cfg.blocks[switch_b]; in zend_jit_case_start()
3607 int default_b = jit->ssa->cfg.map[default_opline - jit->op_array->opcodes]; in zend_jit_case_start()
3614 int b = jit->ssa->cfg.map[target - jit->op_array->opcodes]; in zend_jit_case_start()
3664 ZEND_ASSERT(b < jit->ssa->cfg.blocks_count); in zend_jit_bb_start()
3665 bb = &jit->ssa->cfg.blocks[b]; in zend_jit_bb_start()
3683 if (jit->ssa->cfg.flags & ZEND_FUNC_RECURSIVE_DIRECTLY) { in zend_jit_bb_start()
3690 pred = jit->ssa->cfg.predecessors[bb->predecessor_offset]; in zend_jit_bb_start()
3712 if ((jit->ssa->cfg.blocks[b].flags & ZEND_BB_RECV_ENTRY) in zend_jit_bb_start()
3713 && (jit->ssa->cfg.flags & ZEND_FUNC_RECURSIVE_DIRECTLY)) { in zend_jit_bb_start()
3737 for (i = 0, p = jit->ssa->cfg.predecessors + bb->predecessor_offset; i < n; p++, i++) { in zend_jit_bb_start()
3807 bb = &jit->ssa->cfg.blocks[b]; in zend_jit_bb_end()
3876 bb = &jit->ssa->cfg.blocks[jit->b]; in zend_jit_jmp_frameless()
3893 bb = &jit->ssa->cfg.blocks[jit->b]; in zend_jit_cond_jmp()
4000 zend_basic_block *bb = &jit->ssa->cfg.blocks[b]; in zend_jit_recv_entry()
4027 zend_basic_block *bb = &jit->ssa->cfg.blocks[b]; in zend_jit_osr_entry()
4119 } else if ((jit->ssa->cfg.flags & ZEND_FUNC_RECURSIVE_DIRECTLY) in zend_jit_tail_handler()
4135 bb = &jit->ssa->cfg.blocks[jit->b]; in zend_jit_tail_handler()
4150 ZEND_ASSERT(jit->ssa->cfg.blocks[succ].flags & ZEND_BB_ENTRY); in zend_jit_tail_handler()
4156 jit->ssa->cfg.blocks[succ].flags |= ZEND_BB_ENTRY; in zend_jit_tail_handler()
4160 ref = zend_jit_continue_entry(jit, ref, jit->ssa->cfg.blocks[succ].start); in zend_jit_tail_handler()
7166 bb = &jit->ssa->cfg.blocks[jit->b]; in zend_jit_cmp()
7436 bb = &jit->ssa->cfg.blocks[jit->b]; in zend_jit_identical()
7992 zend_ssa *ssa, in zend_jit_fetch_constant() argument
8043 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD; in zend_jit_fetch_constant()
8682 …onst zend_op *opline, uint32_t b, const zend_op_array *op_array, zend_ssa *ssa, const zend_ssa_op … argument
8811 if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) {
8836 zend_ssa *ssa, argument
9082 if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) {
9107 zend_ssa *ssa, argument
9264 if (zend_jit_needs_call_chain(call_info, b, op_array, ssa, ssa_op, opline, call_level, trace)) {
9289 zend_ssa *ssa, argument
9301 if (ssa->var_info[ssa_op->op2_use].ce != zend_ce_closure
9302 && !(ssa->var_info[ssa_op->op2_use].type & MAY_BE_CLASS_GUARD)) {
9316 if (ssa->var_info && ssa_op->op2_use >= 0) {
9317 ssa->var_info[ssa_op->op2_use].type |= MAY_BE_CLASS_GUARD;
9318 ssa->var_info[ssa_op->op2_use].ce = zend_ce_closure;
9319 ssa->var_info[ssa_op->op2_use].is_instanceof = 0;
9356 if (zend_jit_needs_call_chain(NULL, b, op_array, ssa, ssa_op, opline, call_level, trace)) {
9927 …_ctx *jit, const zend_op *opline, const zend_op_array *op_array, zend_ssa *ssa, int call_level, un… argument
10165 num_args = skip_valid_arguments(op_array, ssa, call_info);
10392 bb = &jit->ssa->cfg.blocks[jit->b];
10404 ZEND_ASSERT(jit->ssa->cfg.blocks[succ].flags & ZEND_BB_ENTRY);
10405 ref = zend_jit_continue_entry(jit, ref, jit->ssa->cfg.blocks[succ].start);
10566 zend_get_func_info(call_info, ssa, &ce, &ce_is_instanceof) :
10623 …_ctx *jit, const zend_op *opline, const zend_op_array *op_array, zend_ssa *ssa, int call_level, in… argument
10634 if (!zend_jit_do_fcall(jit, opline, op_array, ssa, call_level, next_block, NULL)) {
10640 ZEND_ASSERT(jit->ssa->cfg.blocks[next_block].predecessors_count == 1);
11642 bb = &jit->ssa->cfg.blocks[jit->b];
12393 zend_ssa *ssa, argument
12435 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD;
12447 ssa->var_info[ssa_op->result_def].avoid_refcounting = 1;
13677 bb = &jit->ssa->cfg.blocks[jit->b];
13974 bb = &jit->ssa->cfg.blocks[jit->b];
14069 zend_ssa *ssa, argument
14190 if (ssa->var_info && ssa_op->op1_use >= 0) {
14191 ssa->var_info[ssa_op->op1_use].type |= MAY_BE_CLASS_GUARD;
14192 ssa->var_info[ssa_op->op1_use].ce = ce;
14193 ssa->var_info[ssa_op->op1_use].is_instanceof = ce_is_instanceof;
14448 ssa->var_info[ssa_op->result_def].indirect_reference = 1;
14516 ssa->var_info[ssa_op->result_def].avoid_refcounting = 1;
14526 ssa->var_info[ssa_op->result_def].type &= ~MAY_BE_GUARD;
14588 zend_ssa *ssa, argument
14693 if (ssa->var_info && ssa_op->op1_use >= 0) {
14694 ssa->var_info[ssa_op->op1_use].type |= MAY_BE_CLASS_GUARD;
14695 ssa->var_info[ssa_op->op1_use].ce = ce;
14696 ssa->var_info[ssa_op->op1_use].is_instanceof = ce_is_instanceof;
14698 if (ssa->var_info && ssa_op->op1_def >= 0) {
14699 ssa->var_info[ssa_op->op1_def].type |= MAY_BE_CLASS_GUARD;
14700 ssa->var_info[ssa_op->op1_def].ce = ce;
14701 ssa->var_info[ssa_op->op1_def].is_instanceof = ce_is_instanceof;
14947 zend_ssa *ssa, argument
15043 if (ssa->var_info && ssa_op->op1_use >= 0) {
15044 ssa->var_info[ssa_op->op1_use].type |= MAY_BE_CLASS_GUARD;
15045 ssa->var_info[ssa_op->op1_use].ce = ce;
15046 ssa->var_info[ssa_op->op1_use].is_instanceof = ce_is_instanceof;
15048 if (ssa->var_info && ssa_op->op1_def >= 0) {
15049 ssa->var_info[ssa_op->op1_def].type |= MAY_BE_CLASS_GUARD;
15050 ssa->var_info[ssa_op->op1_def].ce = ce;
15051 ssa->var_info[ssa_op->op1_def].is_instanceof = ce_is_instanceof;
15374 zend_ssa *ssa, argument
15466 if (ssa->var_info && ssa_op->op1_use >= 0) {
15467 ssa->var_info[ssa_op->op1_use].type |= MAY_BE_CLASS_GUARD;
15468 ssa->var_info[ssa_op->op1_use].ce = ce;
15469 ssa->var_info[ssa_op->op1_use].is_instanceof = ce_is_instanceof;
15471 if (ssa->var_info && ssa_op->op1_def >= 0) {
15472 ssa->var_info[ssa_op->op1_def].type |= MAY_BE_CLASS_GUARD;
15473 ssa->var_info[ssa_op->op1_def].ce = ce;
15474 ssa->var_info[ssa_op->op1_def].is_instanceof = ce_is_instanceof;
15788 ssa->var_info[ssa_op->result_def].type = res_info & ~MAY_BE_GUARD;
16000 …_ctx *jit, const zend_op *opline, const zend_op_array *op_array, zend_ssa *ssa, zend_jit_trace_rec… argument
16047 b = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(jump_zv)) - op_array->opcodes];
16049 b = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value) - op_array->opcodes];
16055 zend_ssa_op *ssa_op = ssa->ops ? &ssa->ops[opline - op_array->opcodes] : NULL;
16060 int default_b = next_opline ? -1 : ssa->cfg.map[default_opline - op_array->opcodes];
16189 b = ssa->cfg.map[target - op_array->opcodes];
16314 b = ssa->cfg.map[target - op_array->opcodes];
16444 b = ssa->cfg.map[target - op_array->opcodes];
16516 static int zend_jit_start(zend_jit_ctx *jit, const zend_op_array *op_array, zend_ssa *ssa) argument
16526 jit->ssa = ssa;
16527 jit->bb_start_ref = zend_arena_calloc(&CG(arena), ssa->cfg.blocks_count * 2, sizeof(ir_ref));
16528 jit->bb_predecessors = jit->bb_start_ref + ssa->cfg.blocks_count;
16531 for (i = 0, bb = ssa->cfg.blocks; i < ssa->cfg.blocks_count; i++, bb++) {
17075 jit->ssa = NULL;
17085 zend_ssa *ssa, argument
17097 jit->ssa = ssa;
17135 if (ssa && ssa->vars[i].no_val) {
17180 (jit->ssa->var_info[src_var].type & MAY_BE_LONG) ? IR_LONG : IR_DOUBLE,
17254 static bool zend_jit_opline_supports_reg(const zend_op_array *op_array, zend_ssa *ssa, const zend_o… argument
17336 if (!ssa->cfg.map) {
17339 … if (opline > op_array->opcodes + ssa->cfg.blocks[ssa->cfg.map[opline-op_array->opcodes]].start &&
17433 static bool zend_jit_var_supports_reg(zend_ssa *ssa, int var) argument
17435 if (ssa->vars[var].no_val) {
17444 if (ssa->vars[var].definition_phi) {
17447 if (ssa->vars[var].phi_use_chain) {
17448 zend_ssa_phi *phi = ssa->vars[var].phi_use_chain;
17450 if (!ssa->vars[phi->ssa_var].no_val) {
17453 phi = zend_ssa_next_use_phi(ssa, var, phi);
17458 if (((ssa->var_info[var].type & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) != MAY_BE_DOUBLE) &&
17459 ((ssa->var_info[var].type & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) != MAY_BE_LONG)) {
17467 static bool zend_jit_may_be_in_reg(const zend_op_array *op_array, zend_ssa *ssa, int var) argument
17469 if (!zend_jit_var_supports_reg(ssa, var)) {
17473 if (ssa->vars[var].definition >= 0) {
17474 uint32_t def = ssa->vars[var].definition;
17475 if (!zend_jit_opline_supports_reg(op_array, ssa, op_array->opcodes + def, ssa->ops + def, NULL)) {
17480 if (ssa->vars[var].use_chain >= 0) {
17481 int use = ssa->vars[var].use_chain;
17484 if (!zend_ssa_is_no_val_use(op_array->opcodes + use, ssa->ops + use, var) &&
17485 … !zend_jit_opline_supports_reg(op_array, ssa, op_array->opcodes + use, ssa->ops + use, NULL)) {
17488 use = zend_ssa_next_use(ssa->ops, var, use);
17501 if (ssa->vars[var].definition >= 0) {
17502 def_block =ssa->cfg.map[ssa->vars[var].definition];
17504 ZEND_ASSERT(ssa->vars[var].definition_phi);
17505 def_block = ssa->vars[var].definition_phi->block;
17508 ZEND_WORKLIST_ALLOCA(&worklist, ssa->cfg.blocks_count, use_heap);
17510 if (ssa->vars[var].use_chain >= 0) {
17511 use = ssa->vars[var].use_chain;
17513 use_block = ssa->cfg.map[use];
17517 use = zend_ssa_next_use(ssa->ops, var, use);
17521 p = ssa->vars[var].phi_use_chain;
17525 bb = &ssa->cfg.blocks[use_block];
17528 use_block = ssa->cfg.predecessors[bb->predecessor_offset + j];
17535 p = zend_ssa_next_use_phi(ssa, var, p);
17540 bb = &ssa->cfg.blocks[b];
17546 b = ssa->cfg.predecessors[bb->predecessor_offset + j];