Lines Matching refs:cfg
134 if (ssa->cfg.blocks[ssa->cfg.map[use]].loop_header > 0 in zend_ssa_is_last_use()
135 || (ssa->cfg.blocks[ssa->cfg.map[use]].flags & ZEND_BB_LOOP_HEADER)) { in zend_ssa_is_last_use()
136 int b = ssa->cfg.map[use]; in zend_ssa_is_last_use()
141 def_block =ssa->cfg.map[ssa->vars[var].definition]; in zend_ssa_is_last_use()
146 if (dominates(ssa->cfg.blocks, def_block, in zend_ssa_is_last_use()
147 (ssa->cfg.blocks[b].flags & ZEND_BB_LOOP_HEADER) ? b : ssa->cfg.blocks[b].loop_header)) { in zend_ssa_is_last_use()
152 if (b != ssa->cfg.map[prev_use] in zend_ssa_is_last_use()
153 && dominates(ssa->cfg.blocks, b, ssa->cfg.map[prev_use]) in zend_ssa_is_last_use()
387 if (end - op_array->opcodes >= ssa->cfg.blocks[b].start + ssa->cfg.blocks[b].len) { in zend_jit_needs_call_chain()
402 if (!end || end - op_array->opcodes >= ssa->cfg.blocks[b].start + ssa->cfg.blocks[b].len) { in zend_jit_needs_call_chain()
487 for (j = 0; j < ssa->cfg.blocks_count; j++) { in zend_ssa_cv_info()
488 if ((ssa->cfg.blocks[j].flags & ZEND_BB_REACHABLE) && in zend_ssa_cv_info()
489 ssa->cfg.blocks[j].len > 0) { in zend_ssa_cv_info()
490 … const zend_op *opline = op_array->opcodes + ssa->cfg.blocks[j].start + ssa->cfg.blocks[j].len - 1; in zend_ssa_cv_info()
1035 static int zend_jit_build_cfg(const zend_op_array *op_array, zend_cfg *cfg) in zend_jit_build_cfg() argument
1041 zend_build_cfg(&CG(arena), op_array, flags, cfg); in zend_jit_build_cfg()
1046 if (cfg->blocks_count > 100000) { in zend_jit_build_cfg()
1050 zend_cfg_build_predecessors(&CG(arena), cfg); in zend_jit_build_cfg()
1053 zend_cfg_compute_dominators_tree(op_array, cfg); in zend_jit_build_cfg()
1056 zend_cfg_identify_loops(op_array, cfg); in zend_jit_build_cfg()
1063 if (zend_jit_build_cfg(op_array, &ssa->cfg) != SUCCESS) { in zend_jit_op_array_analyze1()
1069 if ((ssa->cfg.flags & ZEND_FUNC_HAS_EXTENDED_INFO)) { in zend_jit_op_array_analyze1()
1076 ssa->cfg.flags |= ZEND_FUNC_INDIRECT_VAR_ACCESS; in zend_jit_op_array_analyze1()
1080 && ssa->cfg.blocks in zend_jit_op_array_analyze1()
1083 && !(ssa->cfg.flags & ZEND_FUNC_INDIRECT_VAR_ACCESS)) { in zend_jit_op_array_analyze1()
1101 && ssa->cfg.blocks in zend_jit_op_array_analyze2()
1104 && !(ssa->cfg.flags & ZEND_FUNC_INDIRECT_VAR_ACCESS)) { in zend_jit_op_array_analyze2()
1155 for (k = 0; k < ssa->cfg.blocks[phi->block].predecessors_count; k++) { in zend_jit_allocate_registers()
1177 for (k = 0; k < ssa->cfg.blocks[phi->block].predecessors_count; k++) { in zend_jit_allocate_registers()
1306 static int zend_jit_compute_post_order(zend_cfg *cfg, int start, int *post_order) in zend_jit_compute_post_order() argument
1314 ZEND_WORKLIST_ALLOCA(&worklist, cfg->blocks_count, use_heap); in zend_jit_compute_post_order()
1320 bb = &cfg->blocks[b]; in zend_jit_compute_post_order()
1325 if (cfg->blocks[*p].flags & (ZEND_BB_CATCH|ZEND_BB_FINALLY|ZEND_BB_FINALLY_END)) { in zend_jit_compute_post_order()
1416 if (ssa->cfg.flags & ZEND_FUNC_IRREDUCIBLE) { in zend_jit()
1423 ssa->cfg.blocks[ssa->cfg.map[rt_opline - op_array->opcodes]].flags |= ZEND_BB_ENTRY; in zend_jit()
1434 int *sorted_blocks = alloca(sizeof(int) * ssa->cfg.blocks_count); in zend_jit()
1435 int n = zend_jit_compute_post_order(&ssa->cfg, 0, sorted_blocks); in zend_jit()
1439 if ((ssa->cfg.blocks[b].flags & ZEND_BB_REACHABLE) == 0) { in zend_jit()
1443 if (ssa->cfg.blocks[b].flags & (ZEND_BB_START|ZEND_BB_RECV_ENTRY)) { in zend_jit()
1444 opline = op_array->opcodes + ssa->cfg.blocks[b].start; in zend_jit()
1445 if (ssa->cfg.flags & ZEND_CFG_RECV_ENTRY) { in zend_jit()
1472 ssa->cfg.blocks[b].len == 1 && in zend_jit()
1473 (ssa->cfg.blocks[b].flags & ZEND_BB_EXIT)) { in zend_jit()
1484 ssa->cfg.blocks[b].len == 1 && in zend_jit()
1485 (ssa->cfg.blocks[b].flags & ZEND_BB_EXIT)) { in zend_jit()
1517 && (ssa->cfg.blocks[b].flags & (ZEND_BB_START|ZEND_BB_RECV_ENTRY)) == 0 in zend_jit()
1518 && rt_opline == op_array->opcodes + ssa->cfg.blocks[b].start) { in zend_jit()
1523 if ((ssa->cfg.blocks[b].flags & ZEND_BB_FOLLOW) in zend_jit()
1524 && ssa->cfg.blocks[b].start != 0 in zend_jit()
1525 && (op_array->opcodes[ssa->cfg.blocks[b].start - 1].opcode == ZEND_NOP in zend_jit()
1526 || op_array->opcodes[ssa->cfg.blocks[b].start - 1].opcode == ZEND_SWITCH_LONG in zend_jit()
1527 || op_array->opcodes[ssa->cfg.blocks[b].start - 1].opcode == ZEND_SWITCH_STRING in zend_jit()
1528 || op_array->opcodes[ssa->cfg.blocks[b].start - 1].opcode == ZEND_MATCH)) { in zend_jit()
1531 zend_jit_set_last_valid_opline(&ctx, op_array->opcodes + ssa->cfg.blocks[b].start); in zend_jit()
1533 } else if (ssa->cfg.blocks[b].flags & ZEND_BB_TARGET) { in zend_jit()
1535 } else if (ssa->cfg.blocks[b].flags & ZEND_BB_RECV_ENTRY) { in zend_jit()
1537 } else if (ssa->cfg.blocks[b].flags & (ZEND_BB_START|ZEND_BB_ENTRY)) { in zend_jit()
1538 zend_jit_set_last_valid_opline(&ctx, op_array->opcodes + ssa->cfg.blocks[b].start); in zend_jit()
1540 if (ssa->cfg.blocks[b].flags & ZEND_BB_LOOP_HEADER) { in zend_jit()
1541 zend_jit_check_timeout(&ctx, op_array->opcodes + ssa->cfg.blocks[b].start, NULL); in zend_jit()
1543 if (!ssa->cfg.blocks[b].len) { in zend_jit()
1571 end = ssa->cfg.blocks[b].start + ssa->cfg.blocks[b].len - 1; in zend_jit()
1572 for (i = ssa->cfg.blocks[b].start; i <= end; i++) { in zend_jit()
2151 target_label = ssa->cfg.blocks[b].successors[0]; in zend_jit()
2152 target_label2 = ssa->cfg.blocks[b].successors[1]; in zend_jit()
2187 target_label = ssa->cfg.blocks[b].successors[0]; in zend_jit()
2188 target_label2 = ssa->cfg.blocks[b].successors[1]; in zend_jit()
2217 target_label = ssa->cfg.blocks[b].successors[0]; in zend_jit()
2218 target_label2 = ssa->cfg.blocks[b].successors[1]; in zend_jit()
2240 target_label = ssa->cfg.blocks[b].successors[0]; in zend_jit()
2241 target_label2 = ssa->cfg.blocks[b].successors[1]; in zend_jit()
2280 if (opline > op_array->opcodes + ssa->cfg.blocks[b].start && in zend_jit()
2283 if (!zend_jit_cond_jmp(&ctx, opline + 1, ssa->cfg.blocks[b].successors[0])) { in zend_jit()
2298 ssa->cfg.blocks[b].successors[0], ssa->cfg.blocks[b].successors[1], in zend_jit()
2317 target_label = ssa->cfg.blocks[b].successors[0]; in zend_jit()
2318 target_label2 = ssa->cfg.blocks[b].successors[1]; in zend_jit()
2346 target_label = ssa->cfg.blocks[b].successors[0]; in zend_jit()
2347 target_label2 = ssa->cfg.blocks[b].successors[1]; in zend_jit()
2406 target_label = ssa->cfg.blocks[b].successors[0]; in zend_jit()
2407 target_label2 = ssa->cfg.blocks[b].successors[1]; in zend_jit()
2585 ssa->cfg.blocks[b].successors[0], opline->opcode, NULL)) { in zend_jit()
2730 if (opline > op_array->opcodes + ssa->cfg.blocks[b].start && in zend_jit()
2733 if (!zend_jit_cond_jmp(&ctx, opline + 1, ssa->cfg.blocks[b].successors[0])) { in zend_jit()
2752 !zend_jit_cond_jmp(&ctx, opline + 1, ssa->cfg.blocks[b].successors[0])) { in zend_jit()
2790 ZEND_ASSERT(b + 1 == ssa->cfg.blocks[b].successors[0]); in zend_jit()
2872 NULL, NULL, (ssa->cfg.flags & ZEND_FUNC_INDIRECT_VAR_ACCESS) != 0, 1)) { in zend_jit()
3131 static void zend_jit_setup_hot_counters_ex(zend_op_array *op_array, zend_cfg *cfg) in zend_jit_setup_hot_counters_ex() argument
3148 for (i = 0; i < cfg->blocks_count; i++) { in zend_jit_setup_hot_counters_ex()
3149 if ((cfg->blocks[i].flags & ZEND_BB_REACHABLE) && in zend_jit_setup_hot_counters_ex()
3150 (cfg->blocks[i].flags & ZEND_BB_LOOP_HEADER)) { in zend_jit_setup_hot_counters_ex()
3151 op_array->opcodes[cfg->blocks[i].start].handler = in zend_jit_setup_hot_counters_ex()
3161 zend_cfg cfg; in zend_jit_restart_hot_counters() local
3169 if (zend_jit_build_cfg(op_array, &cfg) != SUCCESS) { in zend_jit_restart_hot_counters()
3173 zend_jit_setup_hot_counters_ex(op_array, &cfg); in zend_jit_restart_hot_counters()
3181 zend_cfg cfg; in zend_jit_setup_hot_counters() local
3187 if (zend_jit_build_cfg(op_array, &cfg) != SUCCESS) { in zend_jit_setup_hot_counters()
3204 zend_jit_setup_hot_counters_ex(op_array, &cfg); in zend_jit_setup_hot_counters()
3326 info->ssa.cfg.flags |= info->flags; in zend_jit_script()
3327 info->flags = info->ssa.cfg.flags; in zend_jit_script()
3347 info->flags = info->ssa.cfg.flags; in zend_jit_script()