/php-src/Zend/Optimizer/ |
H A D | dfa_pass.c | 162 op_array->opcodes[target] = op_array->opcodes[i]; in zend_ssa_remove_nops() 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() 1567 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array() 1583 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array() 1599 && op_array->opcodes[op_2].op2.var == op_array->opcodes[op_2].result.var 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 D | nop_removal.c | 43 end = op_array->opcodes + op_array->last; in zend_optimizer_nop_removal() 44 for (opline = op_array->opcodes; opline < end; opline++) { in zend_optimizer_nop_removal() 47 if (opline->opcode == ZEND_JMP && ZEND_OP1_JMP_ADDR(opline) > op_array->opcodes + i) { in zend_optimizer_nop_removal() 65 zend_op *new_opline = op_array->opcodes + 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()
|
H A D | dce.c | 352 && var->use_chain == (opline - ctx->op_array->opcodes)) { in try_remove_var_def() 353 zend_op *def_opline = &ctx->op_array->opcodes[def]; in try_remove_var_def() 441 zend_bitset_excl(ctx->instr_dead, opline - ctx->op_array->opcodes); in dce_instr() 577 if (op_array->opcodes[i].opcode == ZEND_OP_DATA) { in dce_optimize_op_array() 590 && !may_throw_dce_exception(&op_array->opcodes[i])) in dce_optimize_op_array() 592 if (op_array->opcodes[i].opcode == ZEND_NEW in dce_optimize_op_array() 593 && op_array->opcodes[i+1].opcode == ZEND_DO_FCALL in dce_optimize_op_array() 621 && (op_array->opcodes[i+1].opcode == ZEND_OP_DATA in dce_optimize_op_array() 622 || (op_array->opcodes[i].opcode == ZEND_NEW in dce_optimize_op_array() 623 && op_array->opcodes[i+1].opcode == ZEND_DO_FCALL))) { in dce_optimize_op_array() [all …]
|
H A D | zend_cfg.c | 51 uint8_t opcode = opcodes[b->start + b->len - 1].opcode; in zend_mark_reachable() 112 zend_mark_reachable(op_array->opcodes, cfg, blocks + start); in zend_mark_reachable_blocks() 165 zend_mark_reachable(op_array->opcodes, cfg, b); in zend_mark_reachable_blocks() 173 zend_mark_reachable(op_array->opcodes, cfg, b); in zend_mark_reachable_blocks() 181 zend_mark_reachable(op_array->opcodes, cfg, b); in zend_mark_reachable_blocks() 211 zend_op *opline = &op_array->opcodes[j]; in zend_mark_reachable_blocks() 288 zend_op *opline = op_array->opcodes + i; in zend_build_cfg() 348 BB_START(OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes); in zend_build_cfg() 357 BB_START(OP_JMP_ADDR(opline, opline->op1) - op_array->opcodes); in zend_build_cfg() 372 BB_START(OP_JMP_ADDR(opline, opline->op2) - op_array->opcodes); in zend_build_cfg() [all …]
|
H A D | optimize_temp_vars_5.c | 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()
|
H A D | block_pass.c | 67 zend_op *opcodes = op_array->opcodes; in strip_leading_nops() local 94 if (op_array->opcodes[i].opcode != ZEND_NOP) { in strip_nops() 96 op_array->opcodes[j] = op_array->opcodes[i]; in strip_nops() 104 MAKE_NOP(op_array->opcodes + j); in strip_nops() 148 opline = op_array->opcodes + block->start; in zend_optimize_block() 968 zend_op *op = op_array->opcodes + b->start; in assemble_code_blocks() 994 efree(op_array->opcodes); in assemble_code_blocks() 995 op_array->opcodes = new_opcodes; in assemble_code_blocks() 1438 opline = op_array->opcodes + block->start; in zend_t_usage() 1519 end = op_array->opcodes + block->start; in zend_t_usage() [all …]
|
H A D | zend_optimizer.c | 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() 1057 while (--free_opline >= op_array->opcodes) { in zend_optimizer_get_loop_var_def() 1189 opline = op_array->opcodes; in zend_revert_pass_two() 1217 zend_op *old_opcodes = op_array->opcodes; in zend_redo_pass_two() 1224 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in zend_redo_pass_two() 1239 opline = op_array->opcodes; in zend_redo_pass_two() 1327 zend_op *old_opcodes = op_array->opcodes; in zend_redo_pass_two_ex() 1334 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in zend_redo_pass_two_ex() 1349 opline = op_array->opcodes; in zend_redo_pass_two_ex() [all …]
|
H A D | optimize_func_calls.c | 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() 113 …(Z_TYPE_P(CRT_CONSTANT_EX(&func->op_array, &func->op_array.opcodes[i], func->op_array.opcodes[i].o… in zend_try_inline_call() 153 zend_op *opline = op_array->opcodes; in zend_optimize_func_calls()
|
H A D | zend_call_graph.c | 48 zend_op *opline = op_array->opcodes; in zend_analyze_calls() 276 map[call->caller_init_opline - op_array->opcodes] = call; in zend_build_call_map() 278 map[call->caller_call_opline - op_array->opcodes] = call; in zend_build_call_map() 283 map[call->arg_info[i].opline - op_array->opcodes] = call; in zend_build_call_map()
|
H A D | zend_func_info.c | 62 ssa->ops ? &ssa->ops[call_info->arg_info[0].opline - op_array->opcodes] : NULL); in zend_range_info() 64 ssa->ops ? &ssa->ops[call_info->arg_info[1].opline - op_array->opcodes] : NULL); in zend_range_info() 70 ssa->ops ? &ssa->ops[call_info->arg_info[2].opline - op_array->opcodes] : NULL); in zend_range_info()
|
H A D | scdf.c | 123 zend_op *opline = &scdf->op_array->opcodes[i]; in scdf_solve() 163 opline = &scdf->op_array->opcodes[j]; in scdf_solve() 216 if (is_live_loop_var_free(scdf, &op_array->opcodes[i], &scdf->ssa->ops[i])) { in kept_alive_by_loop_var_free() 237 zend_op *opline = &op_array->opcodes[i]; in cleanup_loop_var_free_block()
|
H A D | compact_vars.c | 38 zend_op *opline = &op_array->opcodes[i]; in zend_optimizer_compact_vars() 86 zend_op *opline = &op_array->opcodes[i]; in zend_optimizer_compact_vars()
|
H A D | escape_analysis.c | 104 zend_op *opline = op_array->opcodes + def; in zend_build_equi_escape_sets() 153 zend_op *opline = op_array->opcodes + def; in is_allocation_def() 224 zend_op *opline = op_array->opcodes + def; in is_local_def() 274 zend_op *opline = op_array->opcodes + use; in is_escape_use() 480 zend_op *opline = op_array->opcodes + use; in zend_ssa_escape_analysis()
|
H A D | pass3.c | 63 opline = op_array->opcodes; in zend_optimizer_pass3() 100 } else if (opline > op_array->opcodes && in zend_optimizer_pass3()
|
H A D | sccp.c | 1076 call = ctx->call_map[opline - ctx->scdf.op_array->opcodes]; in sccp_visit_instr() 1083 ssa_op = &ctx->scdf.ssa->ops[opline - ctx->scdf.op_array->opcodes]; in sccp_visit_instr() 1658 call = ctx->call_map[opline - ctx->scdf.op_array->opcodes]; in sccp_visit_instr() 1681 &ctx->scdf.ssa->ops[opline - ctx->scdf.op_array->opcodes]); in sccp_visit_instr() 1736 … args[1] = get_op2_value(ctx, opline, &ctx->scdf.ssa->ops[opline - ctx->scdf.op_array->opcodes]); in sccp_visit_instr() 1739 … args[0] = get_op1_value(ctx, opline, &ctx->scdf.ssa->ops[opline - ctx->scdf.op_array->opcodes]); in sccp_visit_instr() 2092 call = ctx->call_map[opline - op_array->opcodes]; in remove_call() 2097 &ssa->ops[call->caller_init_opline - op_array->opcodes]); in remove_call() 2101 &ssa->ops[call->arg_info[i].opline - op_array->opcodes]); in remove_call() 2130 zend_op *opline = &op_array->opcodes[var->definition]; in try_remove_definition() [all …]
|
/php-src/Zend/ |
H A D | zend_vm_gen.php | 623 global $prefix, $opnames, $opcodes; 1691 …_handler($f, 1, $kind, $opcodes[$num]["op"], $op1, $op2, isset($opcodes[$num]["use"]), $opcodes[$n… 1720 …handler($f, 0, $kind, $opcodes[$num]["op"], "ANY", "ANY", isset($opcodes[$num]["use"]), $opcodes[$… 2374 foreach ($opcodes as $code => $dsc) { 2463 if (isset($opcodes[$code])) { 2526 if (isset($opcodes[$code])) { 2612 if (isset($opcodes[$code])) { 2629 ksort($opcodes); 2632 foreach ($opcodes as $dsc) { 2671 fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n"); [all …]
|
H A D | zend_opcode.c | 595 efree(op_array->opcodes); in destroy_op_array() 693 CG(zend_lineno) = op_array->opcodes[op_num].lineno; in zend_check_finally_breakout() 741 zend_op *use_opline = &op_array->opcodes[end]; in emit_live_range() 853 start = block_start_op - op_array->opcodes; in emit_live_range() 864 start = def_opline + 1 - op_array->opcodes; in emit_live_range() 873 start = def_opline + 1 - op_array->opcodes; in emit_live_range() 874 end = use_opline - op_array->opcodes; in emit_live_range() 931 zend_op *opline = &op_array->opcodes[opnum]; in zend_calc_live_ranges() 1061 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, sizeof(zend_op)*op_array->last); in pass_two() 1069 op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, in pass_two() [all …]
|
/php-src/docs/source/introduction/ |
H A D | high-level-overview.rst | 21 - Compilation - traversing the AST and building a list of operations, called opcodes. 22 - Interpretation - reading and executing opcodes. 32 |> compiler -- opcodes 132 into our virtual machine instructions, also called opcodes. The code responsible for this 136 Here's what the surprisingly compact opcodes for the AST above might look like: 148 Finally, the opcodes are read and executed by the interpreter. PHPs uses `three-address code`_ for 155 How exactly each opcode behaves depends on its purpose. You can find a complete list of opcodes in 159 Let's step through the opcodes form the example above: 180 Luckily, it is also not necessary. We can cache the opcodes in memory between requests, to skip over 184 Opcache also performs some optimizations on the opcodes before caching them. As opcaches are [all …]
|
/php-src/ext/opcache/jit/ |
H A D | zend_jit.c | 328 const zend_op *end = op_array->opcodes + op_array->last; in zend_jit_needs_call_chain() 1444 opline = op_array->opcodes + ssa->cfg.blocks[b].start; in zend_jit() 1452 if (opline != op_array->opcodes && recv_emitted) { in zend_jit() 1574 opline = op_array->opcodes + i; in zend_jit() 2668 if (opline == op_array->opcodes || in zend_jit() 3020 zend_op *opline = op_array->opcodes; in zend_runtime_jit() 3073 opline = op_array->opcodes; in zend_jit_check_funcs() 3134 zend_op *opline = op_array->opcodes; in zend_jit_setup_hot_counters_ex() 3221 zend_op *opline = op_array->opcodes; in zend_jit_op_array() 3251 zend_op *opline = op_array->opcodes; in zend_jit_op_array() [all …]
|
H A D | zend_jit_trace.c | 734 int count = opline - op_array->opcodes; in zend_jit_trace_add_call_phis() 798 b = ssa->cfg.map[tssa_opcodes[0] - op_array->opcodes]; in zend_jit_trace_is_false_loop() 800 if (opline >= op_array->opcodes && opline < op_array->opcodes + op_array->last) { in zend_jit_trace_is_false_loop() 924 uint32_t op_num = opline - op_array->opcodes; in zend_jit_trace_copy_ssa_var_info() 1165 while (opline > op_array->opcodes) { in zend_jit_trace_find_init_fcall_op() 6600 op_num = q->opline - op_array->opcodes; in zend_jit_trace() 6876 if (opline > op_array->opcodes) { in zend_jit_trace() 7843 (int)(opline - op_array->opcodes), in zend_jit_dump_trace() 7912 (int)(opline - op_array->opcodes), in zend_jit_dump_trace() 8915 zend_jit_trace_supported(&op_array->opcodes[i]); in zend_jit_setup_hot_trace_counters() [all …]
|
/php-src/Zend/tests/ |
H A D | by_ref_optimization.phpt | 2 Don't optimize send opcodes that differ in by-ref behavior
|
H A D | bug73338.phpt | 2 Bug #73338: Ensure exceptions in function init opcodes are cleaned properly
|
/php-src/ext/opcache/tests/jit/ |
H A D | ignored_opcodes.phpt | 2 JIT: ignored opcodes
|
/php-src/ext/opcache/ |
H A D | zend_accelerator_util_funcs.c | 268 zend_op *end = op_array->opcodes + op_array->last; in zend_accel_build_delayed_early_binding_list() 269 for (zend_op *opline = op_array->opcodes; opline < end; opline++) { in zend_accel_build_delayed_early_binding_list() 278 for (zend_op *opline = op_array->opcodes; opline < end; opline++) { in zend_accel_build_delayed_early_binding_list() 300 zend_op *opline_end = op_array->opcodes + op_array->last; in zend_accel_finalize_delayed_early_binding_list() 301 for (zend_op *opline = op_array->opcodes; opline < opline_end; opline++) { in zend_accel_finalize_delayed_early_binding_list()
|
H A D | zend_persist.c | 422 persist_ptr = zend_shared_alloc_get_xlat_entry(op_array->opcodes); in zend_persist_op_array_ex() 424 op_array->opcodes = persist_ptr; in zend_persist_op_array_ex() 525 …zend_op *new_opcodes = zend_shared_memdup_put(op_array->opcodes, sizeof(zend_op) * op_array->last); in zend_persist_op_array_ex() 548 ((zval*)((char*)(op_array->opcodes + (opline - new_opcodes)) + in zend_persist_op_array_ex() 560 ((zval*)((char*)(op_array->opcodes + (opline - new_opcodes)) + in zend_persist_op_array_ex() 571 opline->op1.jmp_addr = &new_opcodes[opline->op1.jmp_addr - op_array->opcodes]; in zend_persist_op_array_ex() 585 opline->op2.jmp_addr = &new_opcodes[opline->op2.jmp_addr - op_array->opcodes]; in zend_persist_op_array_ex() 589 opline->op2.jmp_addr = &new_opcodes[opline->op2.jmp_addr - op_array->opcodes]; in zend_persist_op_array_ex() 604 efree(op_array->opcodes); in zend_persist_op_array_ex() 605 op_array->opcodes = new_opcodes; in zend_persist_op_array_ex() [all …]
|