/PHP-7.3/ext/opcache/Optimizer/ |
H A D | zend_inference.h | 47 ssa->ops && \ 70 ssa->ops && \ 71 ssa->var_info && \ 94 ssa->ops && \ 95 ssa->var_info && \ 112 ssa->ops && \ 113 ssa->var_info && \ 130 ssa->ops && \ 131 ssa->var_info && \ 212 return get_ssa_var_info(ssa, ssa->ops ? ssa->ops[opline - op_array->opcodes].opN##_use : -1); \ [all …]
|
H A D | dfa_pass.c | 206 ssa->ops[target] = ssa->ops[i]; in zend_ssa_remove_nops() 245 ssa->vars[j].definition -= shiftlist[ssa->vars[j].definition]; in zend_ssa_remove_nops() 248 ssa->vars[j].use_chain -= shiftlist[ssa->vars[j].use_chain]; in zend_ssa_remove_nops() 253 ssa->ops[i].op1_use_chain -= shiftlist[ssa->ops[i].op1_use_chain]; in zend_ssa_remove_nops() 1080 && ssa->ops[ssa->vars[src_var].definition].result_use < 0 in zend_dfa_optimize_op_array() 1086 ssa, &op_array->opcodes[ssa->vars[src_var].definition], in zend_dfa_optimize_op_array() 1122 if (ssa->ops[op_1].op1_use != ssa->ops[op_1].op2_use) { in zend_dfa_optimize_op_array() 1131 ssa->ops[op_1].op1_use = ssa->ops[op_1].op2_use; in zend_dfa_optimize_op_array() 1190 ssa->ops[ret].op1_use_chain = ssa->vars[orig_var].use_chain; in zend_dfa_optimize_op_array() 1222 ssa->ops[op_1].result_def = ssa->ops[op_1].op1_def; in zend_dfa_optimize_op_array() [all …]
|
H A D | dce.c | 51 zend_ssa *ssa; member 291 zend_ssa *ssa = ctx->ssa; in add_phi_sources_to_worklists() local 374 zend_ssa *ssa = ctx->ssa; in dce_instr() local 422 ssa->vars[free_var].use_chain = ssa_op - ssa->ops; in dce_instr() 443 zend_ssa *ssa = ctx->ssa; in try_remove_trivial_phi() local 449 zend_ssa_remove_phi(ssa, phi); in try_remove_trivial_phi() 561 ctx.ssa = ssa; in dce_optimize_op_array() 582 int b = ssa->cfg.blocks_count; in dce_optimize_op_array() 608 || (has_varargs && may_break_varargs(op_array, ssa, &ssa->ops[i]))) { in dce_optimize_op_array() 612 && ssa->vars[ssa->ops[i].result_def].escape_state == ESCAPE_STATE_NO_ESCAPE) { in dce_optimize_op_array() [all …]
|
H A D | zend_ssa.h | 174 zend_ssa_var *var = &ssa->vars[ssa_op->op1_def]; in zend_ssa_remove_op1_def() 181 zend_ssa_var *var = &ssa->vars[ssa_op->op2_def]; in zend_ssa_remove_op2_def() 236 ssa->vars[ssa_op->op1_def].definition = -1; in zend_ssa_rename_defs_of_instr() 243 ssa->vars[ssa_op->op2_def].definition = -1; in zend_ssa_rename_defs_of_instr() 250 ssa->vars[ssa_op->result_def].definition = -1; in zend_ssa_rename_defs_of_instr() 261 int _var_num = (var) - ssa->vars, next; \ 269 int _var_num = (var) - ssa->vars; \ 289 for (_i = 0; _i < ssa->cfg.blocks_count; _i++) { \ 290 phi = ssa->blocks[_i].phis; \ 299 for (_i = 0; _i < ssa->cfg.blocks_count; _i++) { \ [all …]
|
H A D | zend_ssa.c | 1025 if (!ssa->vars) { in zend_ssa_compute_use_def_chains() 1145 ssa->vars[var].use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain() 1153 ssa->ops[use].res_use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain() 1160 ssa->ops[use].op1_use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain() 1192 zend_ssa_unlink_use_chain(ssa, ssa_op - ssa->ops, ssa_op->op1_use); in zend_ssa_remove_instr() 1200 zend_ssa_unlink_use_chain(ssa, ssa_op - ssa->ops, ssa_op->op2_use); in zend_ssa_remove_instr() 1432 zend_ssa_remove_defs_of_instr(ssa, &ssa->ops[j]); in zend_ssa_remove_block() 1433 zend_ssa_remove_instr(ssa, &op_array->opcodes[j], &ssa->ops[j]); in zend_ssa_remove_block() 1487 if (ssa->var_info[var].type & ~ssa->var_info[phi->ssa_var].type) { in propagate_phi_type_widening() 1488 ssa->var_info[phi->ssa_var].type |= ssa->var_info[var].type; in propagate_phi_type_widening() [all …]
|
H A D | scdf.c | 85 scdf->ssa = ssa; in scdf_init() 105 zend_ssa *ssa = scdf->ssa; in scdf_solve() local 121 int block_num = ssa->cfg.map[i]; in scdf_solve() 125 zend_ssa_op *ssa_op = &ssa->ops[i]; in scdf_solve() 143 zend_basic_block *block = &ssa->cfg.blocks[i]; in scdf_solve() 144 zend_ssa_block *ssa_block = &ssa->blocks[i]; in scdf_solve() 190 const zend_cfg *cfg = &scdf->ssa->cfg; in kept_alive_by_live_range() 208 zend_ssa *ssa = scdf->ssa; in scdf_remove_unreachable_blocks() local 212 for (i = 0; i < ssa->cfg.blocks_count; i++) { in scdf_remove_unreachable_blocks() 216 removed_ops += ssa->cfg.blocks[i].len; in scdf_remove_unreachable_blocks() [all …]
|
H A D | ssa_integrity.c | 27 FOREACH_USE(&ssa->vars[var], use) { in is_in_use_chain() 37 FOREACH_PHI_USE(&ssa->vars[var], phi) { in is_in_phi_use_chain() 46 zend_ssa_op *ssa_op = &ssa->ops[op]; in is_used_by_op() 53 zend_ssa_op *ssa_op = &ssa->ops[op]; in is_defined_by_op() 106 (ssa->vars[i].var < op_array->last_var ? ZSTR_VAL(op_array->vars[ssa->vars[i].var]) : "") 113 zend_cfg *cfg = &ssa->cfg; in ssa_verify_integrity() 119 zend_ssa_var *var = &ssa->vars[i]; in ssa_verify_integrity() 152 if (!is_used_by_op(ssa, use, i)) { in ssa_verify_integrity() 178 zend_ssa_op *ssa_op = &ssa->ops[i]; in ssa_verify_integrity() 298 if (ssa->vars[source].var != ssa->vars[phi->ssa_var].var) { in ssa_verify_integrity() [all …]
|
H A D | zend_inference.c | 90 if (ssa->vars[var2].scc != ssa->vars[var].scc) { \ 194 ssa->vars[var].scc = ssa->sccs; in zend_ssa_check_scc_var() 201 ssa->vars[var2].scc = ssa->sccs; in zend_ssa_check_scc_var() 203 ssa->sccs++; in zend_ssa_check_scc_var() 234 ssa->vars[j].scc = ssa->sccs - (ssa->vars[j].scc + 1); in zend_ssa_find_sccs() 266 if (!op_array->function_name || !ssa->vars || !ssa->ops) { in zend_ssa_find_false_dependencies() 1349 …if (ssa->ops[line].op1_def == var || ssa->ops[line].op2_def == var || ssa->ops[line].result_def ==… in zend_inference_calc_range() 1385 op_array, ssa, opline, &ssa->ops[line], in zend_inference_calc_range() 1629 if (ssa->vars[var2].scc == ssa->vars[var].scc && \ 3835 if (info->ssa.ops && info->ssa.vars && info->call_map && in is_recursive_tail_call() [all …]
|
H A D | zend_dump.c | 429 if (!ssa || !ssa->ops || ssa->ops[opline - op_array->opcodes].result_use < 0) { in zend_dump_op() 431 if (ssa && ssa->ops && ssa->ops[opline - op_array->opcodes].result_def >= 0) { in zend_dump_op() 593 if (ssa && ssa->ops) { in zend_dump_op() 606 if (ssa && ssa->ops) { in zend_dump_op() 650 if (ssa && ssa->ops) { in zend_dump_op() 663 if (ssa && ssa->ops) { in zend_dump_op() 694 } else if (ssa && ssa->ops && ssa->ops[opline - op_array->opcodes].result_use >= 0) { in zend_dump_op() 696 if (ssa && ssa->ops) { in zend_dump_op() 706 if (ssa && ssa->ops) { in zend_dump_op() 816 if (ssa && ssa->blocks && ssa->blocks[n].phis) { in zend_dump_block_header() [all …]
|
H A D | escape_analysis.c | 79 zend_ssa_var *ssa_vars = ssa->vars; in zend_build_equi_escape_sets() 80 int ssa_vars_count = ssa->vars_count; in zend_build_equi_escape_sets() 104 zend_ssa_op *op = ssa->ops + def; in zend_build_equi_escape_sets() 169 zend_ssa_op *op = ssa->ops + def; in is_allocation_def() 234 zend_ssa_op *op = ssa->ops + def; in is_local_def() 290 zend_ssa_op *op = ssa->ops + use; in is_escape_use() 361 || (op->op1_def >= 0 && ssa->vars[op->op1_def].alias)) { in is_escape_use() 411 zend_ssa_var *ssa_vars = ssa->vars; in zend_ssa_escape_analysis() 412 int ssa_vars_count = ssa->vars_count; in zend_ssa_escape_analysis() 480 if (is_escape_use(op_array, ssa, use, i)) { in zend_ssa_escape_analysis() [all …]
|
H A D | scdf.h | 26 zend_ssa *ssa; member 49 void scdf_init(zend_optimizer_ctx *ctx, scdf_ctx *scdf, zend_op_array *op_array, zend_ssa *ssa); 56 zend_ssa *ssa = scdf->ssa; in scdf_add_to_worklist() local 57 zend_ssa_var *var = &ssa->vars[var_num]; in scdf_add_to_worklist() 70 zend_ssa_var *var = &scdf->ssa->vars[var_num]; in scdf_add_def_to_worklist() 93 uint32_t edge = scdf_edge(&scdf->ssa->cfg, from, to); in scdf_is_edge_feasible()
|
H A D | sccp.c | 332 zend_ssa_unlink_use_chain(ctx->scdf.ssa, ssa_op - ctx->scdf.ssa->ops, ssa_op->op2_use); in try_replace_op1() 362 zend_ssa_unlink_use_chain(ctx->scdf.ssa, next_op - ctx->scdf.ssa->ops, next_op->op2_use); in try_replace_op2() 2022 zend_ssa *ssa = scdf->ssa; in sccp_visit_phi() local 2065 zend_ssa *ssa = ctx->scdf.ssa; in value_from_type_and_range() local 2104 zend_ssa *ssa = ctx->scdf.ssa; in remove_call() local 2143 zend_ssa *ssa = ctx->scdf.ssa; in try_remove_definition() local 2345 zend_ssa *ssa = ctx->scdf.ssa; in replace_constant_operands() local 2354 zend_ssa_var *var = &ssa->vars[i]; in replace_constant_operands() 2379 zend_ssa_op *ssa_op = &ssa->ops[use]; in replace_constant_operands() 2426 for (; i < ssa->vars_count; ++i) { in sccp_context_init() [all …]
|
H A D | zend_dump.h | 36 void zend_dump_phi_placement(const zend_op_array *op_array, const zend_ssa *ssa); 38 void zend_dump_ssa_variables(const zend_op_array *op_array, const zend_ssa *ssa, uint32_t dump_flag…
|
H A D | zend_optimizer_internal.h | 102 int zend_dfa_analyze_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *ssa); 103 void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *ssa, ze… 115 int sccp_optimize_op_array(zend_optimizer_ctx *ctx, zend_op_array *op_arrya, zend_ssa *ssa, zend_ca… 116 int dce_optimize_op_array(zend_op_array *op_array, zend_ssa *ssa, zend_bool reorder_dtor_effects); 117 int zend_ssa_escape_analysis(const zend_script *script, zend_op_array *op_array, zend_ssa *ssa);
|
H A D | zend_func_info.h | 55 uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa *ssa);
|
H A D | zend_call_graph.h | 51 zend_ssa ssa; /* Static Single Assignmnt Form */ member
|
H A D | zend_func_info.c | 33 typedef uint32_t (*info_func_t)(const zend_call_info *call_info, const zend_ssa *ssa); 64 static uint32_t zend_strlen_info(const zend_call_info *call_info, const zend_ssa *ssa) in zend_strlen_info() argument 90 static uint32_t zend_dechex_info(const zend_call_info *call_info, const zend_ssa *ssa) in zend_dechex_info() argument 102 static uint32_t zend_range_info(const zend_call_info *call_info, const zend_ssa *ssa) in zend_range_info() argument 112 t3 = _ssa_op1_info(call_info->caller_op_array, ssa, call_info->arg_info[2].opline); in zend_range_info() 134 static uint32_t zend_is_type_info(const zend_call_info *call_info, const zend_ssa *ssa) in zend_is_type_info() argument 143 static uint32_t zend_l_ss_info(const zend_call_info *call_info, const zend_ssa *ssa) in zend_l_ss_info() argument 167 static uint32_t zend_lb_ssn_info(const zend_call_info *call_info, const zend_ssa *ssa) in zend_lb_ssn_info() argument 193 static uint32_t zend_b_s_info(const zend_call_info *call_info, const zend_ssa *ssa) in zend_b_s_info() argument 1688 uint32_t zend_get_func_info(const zend_call_info *call_info, const zend_ssa *ssa) in zend_get_func_info() argument [all …]
|
H A D | zend_optimizer.c | 1327 static void zend_redo_pass_two_ex(zend_op_array *op_array, zend_ssa *ssa) in zend_redo_pass_two_ex() argument 1361 …((ssa->ops[opline - op_array->opcodes].op1_def >= 0) ? (OP1_DEF_INFO() & (MAY_BE_UNDEF|MAY_BE_ANY|… in zend_redo_pass_two_ex() 1531 if (zend_dfa_analyze_op_array(call_graph.op_arrays[i], &ctx, &func_info->ssa) == SUCCESS) { in zend_optimize_script() 1532 func_info->flags = func_info->ssa.cfg.flags; in zend_optimize_script() 1543 zend_dfa_optimize_op_array(call_graph.op_arrays[i], &ctx, &func_info->ssa, func_info->call_map); in zend_optimize_script() 1579 if (func_info && func_info->ssa.var_info) { in zend_optimize_script() 1580 zend_redo_pass_two_ex(call_graph.op_arrays[i], &func_info->ssa); in zend_optimize_script()
|