Home
last modified time | relevance | path

Searched refs:op_array (Results 1 – 25 of 91) sorted by relevance

1234

/php-src/Zend/Optimizer/
H A Dnop_removal.c43 end = op_array->opcodes + op_array->last; in zend_optimizer_nop_removal()
65 zend_op *new_opline = op_array->opcodes + new_count; in zend_optimizer_nop_removal()
75 op_array->last = new_count; in zend_optimizer_nop_removal()
76 end = op_array->opcodes + op_array->last; in zend_optimizer_nop_removal()
79 for (opline = op_array->opcodes; opline<end; opline++) { in zend_optimizer_nop_removal()
84 for (j = 0; j < op_array->last_try_catch; j++) { in zend_optimizer_nop_removal()
85 op_array->try_catch_array[j].try_op -= shiftlist[op_array->try_catch_array[j].try_op]; in zend_optimizer_nop_removal()
86 op_array->try_catch_array[j].catch_op -= shiftlist[op_array->try_catch_array[j].catch_op]; in zend_optimizer_nop_removal()
87 if (op_array->try_catch_array[j].finally_op) { in zend_optimizer_nop_removal()
88 op_array->try_catch_array[j].finally_op -= shiftlist[op_array->try_catch_array[j].finally_op]; in zend_optimizer_nop_removal()
[all …]
H A Dcompact_vars.c30 uint32_t used_vars_len = zend_bitset_len(op_array->last_var + op_array->T); in zend_optimizer_compact_vars()
32 uint32_t *vars_map = do_alloca((op_array->last_var + op_array->T) * sizeof(uint32_t), use_heap2); in zend_optimizer_compact_vars()
37 for (i = 0; i < op_array->last; i++) { in zend_optimizer_compact_vars()
67 for (i = op_array->last_var; i < op_array->last_var + op_array->T; i++) { in zend_optimizer_compact_vars()
76 if (num_cvs == op_array->last_var && num_tmps == op_array->T) { in zend_optimizer_compact_vars()
99 if (num_cvs != op_array->last_var) { in zend_optimizer_compact_vars()
109 efree(op_array->vars); in zend_optimizer_compact_vars()
110 op_array->vars = names; in zend_optimizer_compact_vars()
115 efree(op_array->vars); in zend_optimizer_compact_vars()
116 op_array->vars = NULL; in zend_optimizer_compact_vars()
[all …]
H A Dzend_optimizer.c237 op_array->literals = (zval*)erealloc(op_array->literals, op_array->last_literal * sizeof(zval)); in zend_optimizer_add_literal()
626 zend_op *end = op_array->opcodes + op_array->last; in zend_optimizer_replace_by_const()
644 zend_op *end = op_array->opcodes + op_array->last; in zend_optimizer_replace_by_const()
824 return !fbc->op_array.filename || fbc->op_array.filename != filename; in zend_optimizer_ignore_function()
843 if (op_array && op_array->scope && zend_string_equals_ci(op_array->scope->name, lcname)) { in zend_optimizer_get_class_entry()
888 && op_array->scope && !(op_array->scope->ce_flags & ZEND_ACC_TRAIT) in zend_fetch_class_const_info()
1224 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in zend_redo_pass_two()
1228 op_array->literals, sizeof(zval) * op_array->last_literal); in zend_redo_pass_two()
1334 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in zend_redo_pass_two_ex()
1338 op_array->literals, sizeof(zval) * op_array->last_literal); in zend_redo_pass_two_ex()
[all …]
H A Dzend_optimizer_internal.h30 #define ZEND_OP1_LITERAL(opline) (op_array)->literals[(opline)->op1.constant]
32 #define ZEND_OP2_LITERAL(opline) (op_array)->literals[(opline)->op2.constant]
57 op.constant = zend_optimizer_add_literal(op_array, &_c); \
63 op.constant = zend_optimizer_add_literal(op_array, &_c); \
82 int zend_optimizer_add_literal(zend_op_array *op_array, const zval *zv);
92 bool zend_optimizer_update_op1_const(zend_op_array *op_array,
95 bool zend_optimizer_update_op2_const(zend_op_array *op_array,
98 bool zend_optimizer_replace_by_const(zend_op_array *op_array,
114 void zend_optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx);
115 void zend_optimize_dfa(zend_op_array *op_array, zend_optimizer_ctx *ctx);
[all …]
H A Ddfa_pass.c162 op_array->opcodes[target] = op_array->opcodes[i]; in zend_ssa_remove_nops()
252 op_array->last = target; in zend_ssa_remove_nops()
1374 op_array, ssa, &op_array->opcodes[ssa->vars[src_var].definition], in zend_dfa_optimize_op_array()
1413 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1429 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1445 && op_array->opcodes[op_2].op2.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1453 op_array->opcodes[op_2].op1_type = op_array->opcodes[op_2].op2_type; in zend_dfa_optimize_op_array()
1454 op_array->opcodes[op_2].op1.var = op_array->opcodes[op_2].op2.var; in zend_dfa_optimize_op_array()
1534 op_array, ssa, &op_array->opcodes[ssa->vars[src_var].definition], in zend_dfa_optimize_op_array()
1607 op_array->opcodes[op_2].op1_type = op_array->opcodes[op_2].op2_type; in zend_dfa_optimize_op_array()
[all …]
H A Dzend_dump.h36 ZEND_API void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_flags, const char *ms…
37 ZEND_API void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *b, const zend_op …
38 ZEND_API void zend_dump_op_line(const zend_op_array *op_array, const zend_basic_block *b, const zen…
39 void zend_dump_dominators(const zend_op_array *op_array, const zend_cfg *cfg);
40 void zend_dump_dfg(const zend_op_array *op_array, const zend_cfg *cfg, const zend_dfg *dfg);
41 void zend_dump_phi_placement(const zend_op_array *op_array, const zend_ssa *ssa);
42 void zend_dump_ssa_variables(const zend_op_array *op_array, const zend_ssa *ssa, uint32_t dump_flag…
43 ZEND_API void zend_dump_ssa_var(const zend_op_array *op_array, const zend_ssa *ssa, int ssa_var_num…
44 ZEND_API void zend_dump_var(const zend_op_array *op_array, uint8_t var_type, uint32_t var_num);
45 void zend_dump_op_array_name(const zend_op_array *op_array);
H A Dcompact_literals.c56 arg_info = &op_array->arg_info[op_array->num_args]; in type_num_classes()
328 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals()
340 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals()
352 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals()
368 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals()
386 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals()
388 op_array->literals[j+1] = op_array->literals[i+1]; in zend_optimizer_compact_literals()
408 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals()
435 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals()
455 op_array->literals[j] = op_array->literals[i]; in zend_optimizer_compact_literals()
[all …]
H A Dzend_dump.c376 zend_dump_var(op_array, (var_num < op_array->last_var ? IS_CV : var_type), var_num); in zend_dump_ssa_var()
919 if (op_array->function_name) { in zend_dump_op_array_name()
920 if (op_array->scope && op_array->scope->name) { in zend_dump_op_array_name()
921 fprintf(stderr, "%s::%s", op_array->scope->name->val, op_array->function_name->val); in zend_dump_op_array_name()
955 op_array->last, in zend_dump_op_array()
956 op_array->num_args); in zend_dump_op_array()
957 fprintf(stderr, ", vars=%d, tmps=%d", op_array->last_var, op_array->T); in zend_dump_op_array()
1007 …fprintf(stderr, " ; %s:%u-%u\n", op_array->filename->val, op_array->line_start, op_array->line… in zend_dump_op_array()
1070 if (op_array->last_try_catch) { in zend_dump_op_array()
1130 if (op_array->last_try_catch) { in zend_dump_op_array()
[all …]
H A Dzend_inference.h133 #define OP1_HAS_RANGE() (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
134 #define OP1_MIN_RANGE() (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
135 #define OP1_MAX_RANGE() (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
138 #define OP2_HAS_RANGE() (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
198 #define OP1_INFO() (_ssa_op1_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO()
199 #define OP2_INFO() (_ssa_op2_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO()
202 #define RES_USE_INFO() (_ssa_result_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO()
203 #define OP1_DEF_INFO() (_ssa_op1_def_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO()
204 #define OP2_DEF_INFO() (_ssa_op2_def_info(op_array, ssa, opline, ssa_op)) in DEFINE_SSA_OP_INFO()
221 ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
[all …]
H A Doptimize_func_calls.c84 && !(func->op_array.fn_flags & (ZEND_ACC_TRAIT_CLONE)) in zend_try_inline_call()
86 && func->op_array.opcodes[func->op_array.num_args].opcode == ZEND_RETURN) { in zend_try_inline_call()
88 zend_op *ret_opline = func->op_array.opcodes + func->op_array.num_args; in zend_try_inline_call()
91 uint32_t i, num_args = func->op_array.num_args; in zend_try_inline_call()
95 && !(func->op_array.fn_flags & ZEND_ACC_STATIC)) { in zend_try_inline_call()
113 …if (Z_TYPE_P(CRT_CONSTANT_EX(&func->op_array, &func->op_array.opcodes[i], func->op_array.opcodes[i… in zend_try_inline_call()
117 } while (i < func->op_array.num_args); in zend_try_inline_call()
132 zend_delete_call_instructions(op_array, opline-1); in zend_try_inline_call()
153 zend_op *opline = op_array->opcodes; in zend_optimize_func_calls()
154 zend_op *end = opline + op_array->last; in zend_optimize_func_calls()
[all …]
H A Dzend_cfg.c114 if (op_array->last_try_catch) { in zend_mark_reachable_blocks()
146 op_array->try_catch_array[j].try_op = op_array->try_catch_array[j].catch_op; in zend_mark_reachable_blocks()
148 …zend_mark_reachable(op_array->opcodes, cfg, blocks + block_map[op_array->try_catch_array[j].try_op… in zend_mark_reachable_blocks()
287 for (i = 0; i < op_array->last; i++) { in zend_build_cfg()
288 zend_op *opline = op_array->opcodes + i; in zend_build_cfg()
300 if (i + 1 < op_array->last) { in zend_build_cfg()
352 if (i + 1 < op_array->last) { in zend_build_cfg()
358 if (i + 1 < op_array->last) { in zend_build_cfg()
415 !op_array->function_name) { in zend_build_cfg()
447 if (op_array->last_try_catch) { in zend_build_cfg()
[all …]
H A Dzend_call_graph.c40 ZEND_SET_FUNC_INFO(op_array, func_info); in zend_op_array_collect()
48 zend_op *opline = op_array->opcodes; in zend_analyze_calls()
49 zend_op *end = opline + op_array->last; in zend_analyze_calls()
67 script, op_array, opline, &is_prototype); in zend_analyze_calls()
70 call_info->caller_op_array = op_array; in zend_analyze_calls()
114 call_info->caller_op_array = op_array; in zend_analyze_calls()
178 if (op_array == root) { in zend_is_indirectly_recursive()
182 func_info = ZEND_FUNC_INFO(op_array); in zend_is_indirectly_recursive()
200 zend_op_array *op_array; in zend_analyze_recursion() local
210 op_array = call_graph->op_arrays[i]; in zend_analyze_recursion()
[all …]
H A Dzend_cfg.h103 #define CRT_CONSTANT_EX(op_array, opline, node) \ argument
104 (((op_array)->fn_flags & ZEND_ACC_DONE_PASS_TWO) ? \
107 CT_CONSTANT_EX(op_array, (node).constant) \
111 CRT_CONSTANT_EX(op_array, opline, node)
118 ZEND_API void zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t build_flag…
119 void zend_cfg_remark_reachable_blocks(const zend_op_array *op_array, zend_cfg *cfg);
121 ZEND_API void zend_cfg_compute_dominators_tree(const zend_op_array *op_array, zend_cfg *cfg);
122 ZEND_API void zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cfg);
H A Ddce.c51 zend_op_array *op_array; member
75 zend_op_array *op_array, zend_ssa *ssa, in may_have_side_effects() argument
247 if (op_array->static_variables) { in may_have_side_effects()
335 return var_num >= ctx->op_array->last_var; in is_var_dead()
536 ctx.op_array = op_array; in dce_optimize_op_array()
556 if (phi->var >= op_array->last_var in dce_optimize_op_array()
588 …} else if (may_have_side_effects(op_array, ssa, &op_array->opcodes[i], &ssa->ops[i], ctx.reorder_d… in dce_optimize_op_array()
589 || (zend_may_throw(&op_array->opcodes[i], &ssa->ops[i], op_array, ssa) in dce_optimize_op_array()
592 if (op_array->opcodes[i].opcode == ZEND_NEW in dce_optimize_op_array()
620 if (i < op_array->last in dce_optimize_op_array()
[all …]
H A Doptimize_temp_vars_5.c43 void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_ctx *ctx) in zend_optimize_temporary_variables() argument
45 uint32_t T = op_array->T; in zend_optimize_temporary_variables()
46 int offset = op_array->last_var; in zend_optimize_temporary_variables()
63 end = op_array->opcodes; in zend_optimize_temporary_variables()
64 opline = &op_array->opcodes[op_array->last - 1]; in zend_optimize_temporary_variables()
76 end = op_array->opcodes; in zend_optimize_temporary_variables()
77 opline = &op_array->opcodes[op_array->last - 1]; in zend_optimize_temporary_variables()
107 if ((op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) && in zend_optimize_temporary_variables()
177 op_array->T = max + 1 + ZEND_OBSERVER_ENABLED; // reserve last temporary for observers if enabled in zend_optimize_temporary_variables()
H A Dblock_pass.c84 strip_leading_nops(op_array, b); in strip_nops()
96 op_array->opcodes[j] = op_array->opcodes[i]; in strip_nops()
994 efree(op_array->opcodes); in assemble_code_blocks()
996 op_array->last = len; in assemble_code_blocks()
1421 if (op_array->T == 0) { in zend_t_usage()
1427 bitset_len = zend_bitset_len(op_array->last_var + op_array->T); in zend_t_usage()
1495 for (i = op_array->last_var; i< op_array->T; i++) { in zend_t_usage()
1689 if (cfg.blocks_count * (op_array->last_var + op_array->T) > 64 * 1024 * 1024) { in zend_optimize_cfg()
1698 bitset_len = zend_bitset_len(op_array->last_var + op_array->T); in zend_optimize_cfg()
1721 memset(Tsource, 0, (op_array->last_var + op_array->T) * sizeof(zend_op *)); in zend_optimize_cfg()
[all …]
H A Dpass1.c56 zend_optimizer_update_op1_const(op_array, opline, result); in replace_by_const_or_qm_assign()
62 zend_op *opline = op_array->opcodes; in zend_optimizer_pass1()
63 zend_op *end = opline + op_array->last; in zend_optimizer_pass1()
65 (op_array == &ctx->script->main_op_array) : 0; in zend_optimizer_pass1()
102 replace_by_const_or_qm_assign(op_array, opline, &result); in zend_optimizer_pass1()
116 replace_by_const_or_qm_assign(op_array, opline, &result); in zend_optimizer_pass1()
124 replace_by_const_or_qm_assign(op_array, opline, &result); in zend_optimizer_pass1()
138 fake_execute_data.func = (zend_function*)op_array; in zend_optimizer_pass1()
143 replace_by_const_or_qm_assign(op_array, opline, offset); in zend_optimizer_pass1()
160 replace_by_const_or_qm_assign(op_array, opline, &result); in zend_optimizer_pass1()
[all …]
H A Dzend_func_info.h47 #define ZEND_FUNC_INFO(op_array) \ argument
48 ((zend_func_info*)((op_array)->reserved[zend_func_info_rid]))
50 #define ZEND_SET_FUNC_INFO(op_array, info) do { \ argument
51 zend_func_info** pinfo = (zend_func_info**)&(op_array)->reserved[zend_func_info_rid]; \
/php-src/Zend/
H A Dzend_opcode.c57 op_array->last = 0; in init_op_array()
63 op_array->T = 0; in init_op_array()
568 if (!op_array->refcount || --(*op_array->refcount) > 0) { in destroy_op_array()
572 efree_size(op_array->refcount, sizeof(*(op_array->refcount))); in destroy_op_array()
726 op_array->live_range = erealloc(op_array->live_range, in emit_live_range_raw()
730 range = &op_array->live_range[op_array->last_live_range - 1]; in emit_live_range_raw()
1055op_array->vars = (zend_string**) erealloc(op_array->vars, sizeof(zend_string*)*op_array->last_var); in pass_two()
1061 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, sizeof(zend_op)*op_array->last); in pass_two()
1065 op_array->literals = (zval*)erealloc(op_array->literals, sizeof(zval) * op_array->last_literal); in pass_two()
1069 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in pass_two()
[all …]
/php-src/ext/opcache/
H A Dzend_persist.c378 if (op_array->refcount && --(*op_array->refcount) == 0) { in zend_persist_op_array_ex()
471 op_array->vars = zend_shared_alloc_get_xlat_entry(op_array->vars); in zend_persist_op_array_ex()
486 if (op_array->scope in zend_persist_op_array_ex()
660op_array->vars = zend_shared_memdup_put_free(op_array->vars, sizeof(zend_string*) * op_array->last… in zend_persist_op_array_ex()
737 … if (!op_array->scope || (op_array->scope == ce && !(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE))) { in zend_persist_class_method()
742 return op_array; in zend_persist_class_method()
748 zend_shared_alloc_register_xlat_entry(op_array, op_array); in zend_persist_class_method()
749 return op_array; in zend_persist_class_method()
754 if (op_array->refcount && --(*op_array->refcount) == 0) { in zend_persist_class_method()
768 op_array = zend_shared_memdup_put(op_array, sizeof(zend_op_array)); in zend_persist_class_method()
[all …]
H A Dzend_persist_calc.c215 if (op_array->scope) { in zend_persist_op_array_calc_ex()
223 if (op_array->scope in zend_persist_op_array_calc_ex()
244 if (op_array->literals) { in zend_persist_op_array_calc_ex()
254 zend_shared_alloc_register_xlat_entry(op_array->opcodes, op_array->opcodes); in zend_persist_op_array_calc_ex()
257 if (op_array->filename) { in zend_persist_op_array_calc_ex()
261 if (op_array->arg_info) { in zend_persist_op_array_calc_ex()
298 if (op_array->vars) { in zend_persist_op_array_calc_ex()
324 zend_shared_alloc_register_xlat_entry(op_array, op_array); in zend_persist_op_array_calc()
342 zend_shared_alloc_register_xlat_entry(op_array, op_array); in zend_persist_class_method_calc()
351 zend_shared_alloc_register_xlat_entry(op_array, op_array); in zend_persist_class_method_calc()
[all …]
H A Dzend_file_cache.c475 if (op_array->scope) {
494 zend_shared_alloc_register_xlat_entry(op_array->opcodes, op_array->opcodes);
506 if (op_array->literals) {
510 p = op_array->literals;
585 if (op_array->arg_info) {
588 p = op_array->arg_info;
606 if (op_array->vars) {
610 p = op_array->vars;
1390 p = op_array->literals;
1479 if (op_array->vars) {
[all …]
/php-src/ext/opcache/jit/
H A Dzend_jit.c328 const zend_op *end = op_array->opcodes + op_array->last; in zend_jit_needs_call_chain()
1407 op_array->scope ? ZSTR_VAL(op_array->scope->name) : "", in zend_jit()
1410 ZSTR_VAL(op_array->filename), op_array->line_start); in zend_jit()
2969 op_array = (zend_op_array*) jit_extension->op_array; in zend_real_jit_func()
2972 op_array = (zend_op_array*) jit_extension->op_array; in zend_real_jit_func()
3019 zend_op_array *op_array = &EX(func)->op_array; in zend_runtime_jit() local
3072 op_array = &func->op_array; in zend_jit_check_funcs()
3096 zend_op_array *op_array = &EX(func)->op_array; in zend_jit_hot_func() local
3197 jit_extension->op_array = op_array; in zend_jit_setup_hot_counters()
3242 jit_extension->op_array = op_array; in zend_jit_op_array()
[all …]
H A Dzend_jit_trace.c1428 op_array = p->op_array; in zend_jit_trace_build_tssa()
1475 op_array = p->op_array; in zend_jit_trace_build_tssa()
1577 op_array = p->op_array; in zend_jit_trace_build_tssa()
1587 op_array = p->op_array; in zend_jit_trace_build_tssa()
2468 op_array = p->op_array; in zend_jit_trace_build_tssa()
2536 op_array = p->op_array; in zend_jit_trace_build_tssa()
3192 op_array = p->op_array; in zend_jit_trace_allocate_registers()
3218 op_array = p->op_array; in zend_jit_trace_allocate_registers()
4152 op_array = p->op_array; in zend_jit_trace()
7799 op_array = p->op_array; in zend_jit_dump_trace()
[all …]
H A Dzend_jit_vm_helpers.c125 zend_op_array *op_array = &EX(func)->op_array; in zend_jit_copy_extra_args_helper() local
145 dst = src + (op_array->last_var + op_array->T - first_extra_arg); in zend_jit_copy_extra_args_helper()
607 const zend_op_array *op_array; local
637 op_array = &EX(func)->op_array;
641 if (!op_array->function_name
643 op_array = jit_extension->op_array;
959 op_array = &EX(func)->op_array;
976 if (!op_array->function_name
978 op_array = jit_extension->op_array;
1000 if (EX(func)->op_array.prop_info) {
[all …]

Completed in 138 milliseconds

1234