Lines Matching refs:op_array
41 zend_result zend_dfa_analyze_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *s… in zend_dfa_analyze_op_array() argument
45 if (op_array->last_try_catch) { in zend_dfa_analyze_op_array()
53 zend_build_cfg(&ctx->arena, op_array, ZEND_CFG_NO_ENTRY_PREDECESSORS, &ssa->cfg); in zend_dfa_analyze_op_array()
63 zend_dump_op_array(op_array, ZEND_DUMP_CFG, "dfa cfg", &ssa->cfg); in zend_dfa_analyze_op_array()
67 zend_cfg_compute_dominators_tree(op_array, &ssa->cfg); in zend_dfa_analyze_op_array()
70 zend_cfg_identify_loops(op_array, &ssa->cfg); in zend_dfa_analyze_op_array()
73 zend_dump_dominators(op_array, &ssa->cfg); in zend_dfa_analyze_op_array()
83 if (zend_build_ssa(&ctx->arena, ctx->script, op_array, build_flags, ssa) == FAILURE) { in zend_dfa_analyze_op_array()
88 zend_dump_op_array(op_array, ZEND_DUMP_SSA, "dfa ssa", ssa); in zend_dfa_analyze_op_array()
92 zend_ssa_compute_use_def_chains(&ctx->arena, op_array, ssa); in zend_dfa_analyze_op_array()
94 zend_ssa_find_false_dependencies(op_array, ssa); in zend_dfa_analyze_op_array()
96 zend_ssa_find_sccs(op_array, ssa); in zend_dfa_analyze_op_array()
98 …if (zend_ssa_inference(&ctx->arena, op_array, ctx->script, ssa, ctx->optimization_level) == FAILUR… in zend_dfa_analyze_op_array()
102 if (zend_ssa_escape_analysis(ctx->script, op_array, ssa) == FAILURE) { in zend_dfa_analyze_op_array()
107 zend_dump_ssa_variables(op_array, ssa, 0); in zend_dfa_analyze_op_array()
113 static void zend_ssa_remove_nops(zend_op_array *op_array, zend_ssa *ssa, zend_optimizer_ctx *ctx) in zend_ssa_remove_nops() argument
125 shiftlist = (uint32_t *)do_alloca(sizeof(uint32_t) * op_array->last, use_heap); in zend_ssa_remove_nops()
126 memset(shiftlist, 0, sizeof(uint32_t) * op_array->last); in zend_ssa_remove_nops()
128 func_info = ZEND_FUNC_INFO(op_array); in zend_ssa_remove_nops()
151 ZEND_ASSERT(op_array->opcodes[b->start].opcode == ZEND_FREE in zend_ssa_remove_nops()
152 || op_array->opcodes[b->start].opcode == ZEND_FE_FREE); in zend_ssa_remove_nops()
160 if (EXPECTED(op_array->opcodes[i].opcode != ZEND_NOP)) { in zend_ssa_remove_nops()
162 op_array->opcodes[target] = op_array->opcodes[i]; in zend_ssa_remove_nops()
176 opline = op_array->opcodes + old_end - 1; in zend_ssa_remove_nops()
181 new_opline = op_array->opcodes + target - 1; in zend_ssa_remove_nops()
182 zend_optimizer_migrate_jump(op_array, new_opline, opline); in zend_ssa_remove_nops()
193 if (target != op_array->last) { in zend_ssa_remove_nops()
195 for (i = target; i < op_array->last; i++) { in zend_ssa_remove_nops()
196 MAKE_NOP(op_array->opcodes + i); in zend_ssa_remove_nops()
208 for (i = 0; i < op_array->last; i++) { in zend_ssa_remove_nops()
223 zend_op *opline = op_array->opcodes + b->start + b->len - 1; in zend_ssa_remove_nops()
224 zend_optimizer_shift_jump(op_array, opline, shiftlist); in zend_ssa_remove_nops()
229 for (j = 0; j < op_array->last_try_catch; j++) { in zend_ssa_remove_nops()
230 op_array->try_catch_array[j].try_op -= shiftlist[op_array->try_catch_array[j].try_op]; in zend_ssa_remove_nops()
231 op_array->try_catch_array[j].catch_op -= shiftlist[op_array->try_catch_array[j].catch_op]; in zend_ssa_remove_nops()
232 if (op_array->try_catch_array[j].finally_op) { in zend_ssa_remove_nops()
233 op_array->try_catch_array[j].finally_op -= shiftlist[op_array->try_catch_array[j].finally_op]; in zend_ssa_remove_nops()
234 op_array->try_catch_array[j].finally_end -= shiftlist[op_array->try_catch_array[j].finally_end]; in zend_ssa_remove_nops()
243 shiftlist[call_info->caller_init_opline - op_array->opcodes]; in zend_ssa_remove_nops()
246 shiftlist[call_info->caller_call_opline - op_array->opcodes]; in zend_ssa_remove_nops()
252 op_array->last = target; in zend_ssa_remove_nops()
269 const zend_script *script, const zend_op_array *op_array, in can_elide_list_type() argument
279 return can_elide_list_type(script, op_array, use_info, *single_type); in can_elide_list_type()
283 zend_class_entry *ce = zend_optimizer_get_class_entry(script, op_array, lcname); in can_elide_list_type()
295 const zend_script *script, zend_op_array *op_array, zend_ssa *ssa, zend_ssa_op *ssa_op) { in can_elide_return_type_check() argument
296 zend_arg_info *arg_info = &op_array->arg_info[-1]; in can_elide_return_type_check()
315 return can_elide_list_type(script, op_array, use_info, arg_info->type); in can_elide_return_type_check()
322 zend_op_array *op_array, zend_ssa *ssa, zend_op *opline, int src_var, uint32_t cv_var) { in opline_supports_assign_contraction() argument
363 && zend_may_throw(opline, &ssa->ops[ssa->vars[src_var].definition], op_array, ssa)) { in opline_supports_assign_contraction()
388 int zend_dfa_optimize_calls(zend_op_array *op_array, zend_ssa *ssa) in zend_dfa_optimize_calls() argument
390 zend_func_info *func_info = ZEND_FUNC_INFO(op_array); in zend_dfa_optimize_calls()
415 … if (zend_is_true(CT_CONSTANT_EX(op_array, (call_info->caller_call_opline - 1)->op1.constant))) { in zend_dfa_optimize_calls()
424 && Z_TYPE_P(CT_CONSTANT_EX(op_array, send_array->op1.constant)) == IS_ARRAY in zend_dfa_optimize_calls()
430 HashTable *src = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, send_array->op1.constant)); in zend_dfa_optimize_calls()
461 uint32_t op_num = send_needly - op_array->opcodes; in zend_dfa_optimize_calls()
473 op_num = call_info->caller_call_opline - op_array->opcodes; in zend_dfa_optimize_calls()
488 call_info->caller_call_opline->op2.constant = zend_optimizer_add_literal(op_array, &tmp); in zend_dfa_optimize_calls()
497 op_num = call_info->caller_call_opline - op_array->opcodes; in zend_dfa_optimize_calls()
509 && (op_array->opcodes[use].opcode == ZEND_JMPZ in zend_dfa_optimize_calls()
510 || op_array->opcodes[use].opcode == ZEND_JMPNZ)) { in zend_dfa_optimize_calls()
512 op_array->opcodes[use].op1_type = IS_TMP_VAR; in zend_dfa_optimize_calls()
559 static void compress_block(zend_op_array *op_array, zend_basic_block *block) in compress_block() argument
562 zend_op *opline = &op_array->opcodes[block->start + block->len - 1]; in compress_block()
623 static void zend_ssa_replace_control_link(zend_op_array *op_array, zend_ssa *ssa, int from, int to,… in zend_ssa_replace_control_link() argument
638 opline = op_array->opcodes + src->start + src->len - 1; in zend_ssa_replace_control_link()
642 ZEND_ASSERT(ZEND_OP1_JMP_ADDR(opline) == op_array->opcodes + old->start); in zend_ssa_replace_control_link()
643 ZEND_SET_OP_JMP_ADDR(opline, opline->op1, op_array->opcodes + dst->start); in zend_ssa_replace_control_link()
655 if (ZEND_OP2_JMP_ADDR(opline) == op_array->opcodes + old->start) { in zend_ssa_replace_control_link()
656 ZEND_SET_OP_JMP_ADDR(opline, opline->op2, op_array->opcodes + dst->start); in zend_ssa_replace_control_link()
661 if (ZEND_OP2_JMP_ADDR(opline) == op_array->opcodes + old->start) { in zend_ssa_replace_control_link()
662 ZEND_SET_OP_JMP_ADDR(opline, opline->op2, op_array->opcodes + dst->start); in zend_ssa_replace_control_link()
668 if (ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) == old->start) { in zend_ssa_replace_control_link()
669 opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, dst->start); in zend_ssa_replace_control_link()
679 if (ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, Z_LVAL_P(zv)) == old->start) { in zend_ssa_replace_control_link()
680 Z_LVAL_P(zv) = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, dst->start); in zend_ssa_replace_control_link()
683 if (ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value) == old->start) { in zend_ssa_replace_control_link()
684 opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, opline, dst->start); in zend_ssa_replace_control_link()
694 static void zend_ssa_unlink_block(zend_op_array *op_array, zend_ssa *ssa, zend_basic_block *block, … in zend_ssa_unlink_block() argument
706 if ((op_array->opcodes[pred_block->start + pred_block->len - 1].opcode == ZEND_FE_FETCH_R in zend_ssa_unlink_block()
707 || op_array->opcodes[pred_block->start + pred_block->len - 1].opcode == ZEND_FE_FETCH_RW) in zend_ssa_unlink_block()
708 && op_array->opcodes[pred_block->start + pred_block->len - 1].op2_type == IS_CV) { in zend_ssa_unlink_block()
714 zend_ssa_replace_control_link(op_array, ssa, predecessors[i], block_num, block->successors[0]); in zend_ssa_unlink_block()
716 zend_ssa_remove_block(op_array, ssa, block_num); in zend_ssa_unlink_block()
727 static int zend_dfa_optimize_jmps(zend_op_array *op_array, zend_ssa *ssa) in zend_dfa_optimize_jmps() argument
738 compress_block(op_array, block); in zend_dfa_optimize_jmps()
740 zend_ssa_unlink_block(op_array, ssa, block, block_num); in zend_dfa_optimize_jmps()
767 opline = op_array->opcodes + op_num; in zend_dfa_optimize_jmps()
782 if (zend_is_true(CT_CONSTANT_EX(op_array, opline->op1.constant))) { in zend_dfa_optimize_jmps()
813 if (zend_is_true(CT_CONSTANT_EX(op_array, opline->op1.constant))) { in zend_dfa_optimize_jmps()
849 if (zend_is_true(CT_CONSTANT_EX(op_array, opline->op1.constant))) { in zend_dfa_optimize_jmps()
863 if (!zend_is_true(CT_CONSTANT_EX(op_array, opline->op1.constant))) { in zend_dfa_optimize_jmps()
877 if (!zend_is_true(CT_CONSTANT_EX(op_array, opline->op1.constant))) { in zend_dfa_optimize_jmps()
891 if (Z_TYPE_P(CT_CONSTANT_EX(op_array, opline->op1.constant)) == IS_NULL) { in zend_dfa_optimize_jmps()
913 if (Z_TYPE_P(CT_CONSTANT_EX(op_array, opline->op1.constant)) == IS_NULL) { in zend_dfa_optimize_jmps()
934 zval *zv = CT_CONSTANT_EX(op_array, opline->op1.constant); in zend_dfa_optimize_jmps()
955 HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); in zend_dfa_optimize_jmps()
961 target = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, Z_LVAL_P(jmp_zv)); in zend_dfa_optimize_jmps()
963 target = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value); in zend_dfa_optimize_jmps()
967 target = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value); in zend_dfa_optimize_jmps()
972 ZEND_SET_OP_JMP_ADDR(opline, opline->op1, op_array->opcodes + target); in zend_dfa_optimize_jmps()
980 compress_block(op_array, block); in zend_dfa_optimize_jmps()
983 zend_ssa_unlink_block(op_array, ssa, block, block_num); in zend_dfa_optimize_jmps()
1006 static bool zend_dfa_try_to_replace_result(zend_op_array *op_array, zend_ssa *ssa, int def, int cv_… in zend_dfa_try_to_replace_result() argument
1020 && op_array->opcodes[use].opcode != ZEND_FREE in zend_dfa_try_to_replace_result()
1021 && op_array->opcodes[use].opcode != ZEND_SEND_VAL in zend_dfa_try_to_replace_result()
1022 && op_array->opcodes[use].opcode != ZEND_SEND_VAL_EX in zend_dfa_try_to_replace_result()
1023 && op_array->opcodes[use].opcode != ZEND_VERIFY_RETURN_TYPE in zend_dfa_try_to_replace_result()
1024 && op_array->opcodes[use].opcode != ZEND_YIELD) { in zend_dfa_try_to_replace_result()
1027 const zend_op *opline = &op_array->opcodes[use]; in zend_dfa_try_to_replace_result()
1044 op_array->opcodes[def].result_type = IS_UNUSED; in zend_dfa_try_to_replace_result()
1045 op_array->opcodes[def].result.var = 0; in zend_dfa_try_to_replace_result()
1052 op_array->opcodes[use].op1_type = IS_CV; in zend_dfa_try_to_replace_result()
1053 op_array->opcodes[use].op1.var = cv; in zend_dfa_try_to_replace_result()
1059 op_array->opcodes[use].op2_type = IS_CV; in zend_dfa_try_to_replace_result()
1060 op_array->opcodes[use].op2.var = cv; in zend_dfa_try_to_replace_result()
1066 op_array->opcodes[use].result_type = IS_CV; in zend_dfa_try_to_replace_result()
1067 op_array->opcodes[use].result.var = cv; in zend_dfa_try_to_replace_result()
1078 void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx, zend_ssa *ssa, ze… in zend_dfa_optimize_op_array() argument
1081 zend_dump_op_array(op_array, ZEND_DUMP_SSA, "before dfa pass", ssa); in zend_dfa_optimize_op_array()
1093 ssa_verify_integrity(op_array, ssa, "before dfa"); in zend_dfa_optimize_op_array()
1097 if (sccp_optimize_op_array(ctx, op_array, ssa, call_map)) { in zend_dfa_optimize_op_array()
1101 if (zend_dfa_optimize_jmps(op_array, ssa)) { in zend_dfa_optimize_op_array()
1106 ssa_verify_integrity(op_array, ssa, "after sccp"); in zend_dfa_optimize_op_array()
1108 if (ZEND_FUNC_INFO(op_array)) { in zend_dfa_optimize_op_array()
1109 if (zend_dfa_optimize_calls(op_array, ssa)) { in zend_dfa_optimize_op_array()
1114 zend_dump_op_array(op_array, ZEND_DUMP_SSA, "after sccp pass", ssa); in zend_dfa_optimize_op_array()
1117 ssa_verify_integrity(op_array, ssa, "after calls"); in zend_dfa_optimize_op_array()
1122 if (dce_optimize_op_array(op_array, ctx, ssa, 0)) { in zend_dfa_optimize_op_array()
1125 if (zend_dfa_optimize_jmps(op_array, ssa)) { in zend_dfa_optimize_op_array()
1129 zend_dump_op_array(op_array, ZEND_DUMP_SSA, "after dce pass", ssa); in zend_dfa_optimize_op_array()
1132 ssa_verify_integrity(op_array, ssa, "after dce"); in zend_dfa_optimize_op_array()
1136 for (v = op_array->last_var; v < ssa->vars_count; v++) { in zend_dfa_optimize_op_array()
1144 opline = op_array->opcodes + op_1; in zend_dfa_optimize_op_array()
1157 zval *zv = CT_CONSTANT_EX(op_array, opline->op2.constant); in zend_dfa_optimize_op_array()
1160 opline->op2.constant = zend_optimizer_add_literal(op_array, &tmp); in zend_dfa_optimize_op_array()
1168 zval *zv = CT_CONSTANT_EX(op_array, opline->op1.constant); in zend_dfa_optimize_op_array()
1171 opline->op1.constant = zend_optimizer_add_literal(op_array, &tmp); in zend_dfa_optimize_op_array()
1185 zval *zv = CT_CONSTANT_EX(op_array, opline->op1.constant); in zend_dfa_optimize_op_array()
1193 opline->op1.constant = zend_optimizer_add_literal(op_array, &tmp); in zend_dfa_optimize_op_array()
1194 zv = CT_CONSTANT_EX(op_array, opline->op1.constant); in zend_dfa_optimize_op_array()
1197 zv = CT_CONSTANT_EX(op_array, opline->op1.constant); in zend_dfa_optimize_op_array()
1220 zv = CT_CONSTANT_EX(op_array, opline->op1.constant); in zend_dfa_optimize_op_array()
1238 zval *zv = CT_CONSTANT_EX(op_array, opline->op2.constant); in zend_dfa_optimize_op_array()
1241 && Z_TYPE_INFO_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == IS_LONG) { in zend_dfa_optimize_op_array()
1246 opline->op2.constant = zend_optimizer_add_literal(op_array, &tmp); in zend_dfa_optimize_op_array()
1247 zv = CT_CONSTANT_EX(op_array, opline->op2.constant); in zend_dfa_optimize_op_array()
1265 zv = CT_CONSTANT_EX(op_array, opline->op2.constant); in zend_dfa_optimize_op_array()
1296 && can_elide_return_type_check(ctx->script, op_array, ssa, &ssa->ops[op_1])) { in zend_dfa_optimize_op_array()
1319 && can_elide_return_type_check(ctx->script, op_array, ssa, &ssa->ops[op_1])) { in zend_dfa_optimize_op_array()
1359 op_array, ssa, &op_array->opcodes[ssa->vars[src_var].definition], in zend_dfa_optimize_op_array()
1390 op_array->opcodes[op_2].result_type = opline->result_type; in zend_dfa_optimize_op_array()
1391 op_array->opcodes[op_2].result.var = opline->result.var; in zend_dfa_optimize_op_array()
1396 if (op_array->opcodes[op_2].opcode == ZEND_SUB in zend_dfa_optimize_op_array()
1397 && op_array->opcodes[op_2].op1_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1398 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1399 && op_array->opcodes[op_2].op2_type == IS_CONST in zend_dfa_optimize_op_array()
1400 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1401 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == 1 in zend_dfa_optimize_op_array()
1405 op_array->opcodes[op_2].opcode = ZEND_PRE_DEC; in zend_dfa_optimize_op_array()
1406 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1407 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1412 } else if (op_array->opcodes[op_2].opcode == ZEND_ADD in zend_dfa_optimize_op_array()
1413 && op_array->opcodes[op_2].op1_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1414 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1415 && op_array->opcodes[op_2].op2_type == IS_CONST in zend_dfa_optimize_op_array()
1416 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1417 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == 1 in zend_dfa_optimize_op_array()
1421 op_array->opcodes[op_2].opcode = ZEND_PRE_INC; in zend_dfa_optimize_op_array()
1422 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1423 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1428 } else if (op_array->opcodes[op_2].opcode == ZEND_ADD in zend_dfa_optimize_op_array()
1429 && op_array->opcodes[op_2].op2_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1430 && op_array->opcodes[op_2].op2.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1431 && op_array->opcodes[op_2].op1_type == IS_CONST in zend_dfa_optimize_op_array()
1432 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op1.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1433 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op1.constant)) == 1 in zend_dfa_optimize_op_array()
1437 op_array->opcodes[op_2].opcode = ZEND_PRE_INC; in zend_dfa_optimize_op_array()
1438 op_array->opcodes[op_2].op1_type = op_array->opcodes[op_2].op2_type; in zend_dfa_optimize_op_array()
1439 op_array->opcodes[op_2].op1.var = op_array->opcodes[op_2].op2.var; in zend_dfa_optimize_op_array()
1440 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1441 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1453 if (ssa->vars[v].var >= op_array->last_var) { in zend_dfa_optimize_op_array()
1464 zend_dfa_try_to_replace_result(op_array, ssa, op_1, v); in zend_dfa_optimize_op_array()
1472 if (use >= 0 && op_array->opcodes[use].opcode == ZEND_IS_SMALLER in zend_dfa_optimize_op_array()
1474 && zend_dfa_try_to_replace_result(op_array, ssa, op_1, v)) { in zend_dfa_optimize_op_array()
1476 op_array->opcodes[use].opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_dfa_optimize_op_array()
1486 if (use >= 0 && op_array->opcodes[use].opcode == ZEND_IS_SMALLER in zend_dfa_optimize_op_array()
1488 && zend_dfa_try_to_replace_result(op_array, ssa, op_1, v)) { in zend_dfa_optimize_op_array()
1490 op_array->opcodes[use].opcode = ZEND_IS_SMALLER_OR_EQUAL; in zend_dfa_optimize_op_array()
1519 op_array, ssa, &op_array->opcodes[ssa->vars[src_var].definition], in zend_dfa_optimize_op_array()
1544 op_array->opcodes[op_2].result_type = opline->op1_type; in zend_dfa_optimize_op_array()
1545 op_array->opcodes[op_2].result.var = opline->op1.var; in zend_dfa_optimize_op_array()
1550 if (op_array->opcodes[op_2].opcode == ZEND_SUB in zend_dfa_optimize_op_array()
1551 && op_array->opcodes[op_2].op1_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1552 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1553 && op_array->opcodes[op_2].op2_type == IS_CONST in zend_dfa_optimize_op_array()
1554 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1555 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == 1 in zend_dfa_optimize_op_array()
1559 op_array->opcodes[op_2].opcode = ZEND_PRE_DEC; in zend_dfa_optimize_op_array()
1560 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1561 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1566 } else if (op_array->opcodes[op_2].opcode == ZEND_ADD in zend_dfa_optimize_op_array()
1567 && op_array->opcodes[op_2].op1_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1568 && op_array->opcodes[op_2].op1.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1569 && op_array->opcodes[op_2].op2_type == IS_CONST in zend_dfa_optimize_op_array()
1570 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1571 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op2.constant)) == 1 in zend_dfa_optimize_op_array()
1575 op_array->opcodes[op_2].opcode = ZEND_PRE_INC; in zend_dfa_optimize_op_array()
1576 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1577 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1582 } else if (op_array->opcodes[op_2].opcode == ZEND_ADD in zend_dfa_optimize_op_array()
1583 && op_array->opcodes[op_2].op2_type == op_array->opcodes[op_2].result_type in zend_dfa_optimize_op_array()
1584 && op_array->opcodes[op_2].op2.var == op_array->opcodes[op_2].result.var in zend_dfa_optimize_op_array()
1585 && op_array->opcodes[op_2].op1_type == IS_CONST in zend_dfa_optimize_op_array()
1586 && Z_TYPE_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op1.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1587 && Z_LVAL_P(CT_CONSTANT_EX(op_array, op_array->opcodes[op_2].op1.constant)) == 1 in zend_dfa_optimize_op_array()
1591 op_array->opcodes[op_2].opcode = ZEND_PRE_INC; in zend_dfa_optimize_op_array()
1592 op_array->opcodes[op_2].op1_type = op_array->opcodes[op_2].op2_type; in zend_dfa_optimize_op_array()
1593 op_array->opcodes[op_2].op1.var = op_array->opcodes[op_2].op2.var; in zend_dfa_optimize_op_array()
1594 SET_UNUSED(op_array->opcodes[op_2].op2); in zend_dfa_optimize_op_array()
1595 SET_UNUSED(op_array->opcodes[op_2].result); in zend_dfa_optimize_op_array()
1641 && Z_TYPE_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1642 && Z_LVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == 1 in zend_dfa_optimize_op_array()
1656 && Z_TYPE_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == IS_LONG in zend_dfa_optimize_op_array()
1657 && Z_LVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)) == 1 in zend_dfa_optimize_op_array()
1690 ssa_verify_integrity(op_array, ssa, "after dfa"); in zend_dfa_optimize_op_array()
1694 zend_ssa_remove_nops(op_array, ssa, ctx); in zend_dfa_optimize_op_array()
1696 ssa_verify_integrity(op_array, ssa, "after nop"); in zend_dfa_optimize_op_array()
1702 zend_dump_op_array(op_array, ZEND_DUMP_SSA, "after dfa pass", ssa); in zend_dfa_optimize_op_array()
1706 void zend_optimize_dfa(zend_op_array *op_array, zend_optimizer_ctx *ctx) in zend_optimize_dfa() argument
1711 if (zend_dfa_analyze_op_array(op_array, ctx, &ssa) == FAILURE) { in zend_optimize_dfa()
1716 zend_dfa_optimize_op_array(op_array, ctx, &ssa, NULL); in zend_optimize_dfa()