Lines Matching refs:op_array
45 static zend_bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, int from, in… in needs_pi() argument
71 zend_arena **arena, const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, in add_pi() argument
75 if (!needs_pi(op_array, dfg, ssa, from, to, var)) { in add_pi()
165 static int find_adjusted_tmp_var(const zend_op_array *op_array, uint32_t build_flags, zend_op *opli… in find_adjusted_tmp_var() argument
170 while (op != op_array->opcodes) { in find_adjusted_tmp_var()
231 zend_arena **arena, const zend_script *script, const zend_op_array *op_array, in place_essa_pis() argument
237 zend_op *opline = op_array->opcodes + blocks[j].start + blocks[j].len - 1; in place_essa_pis()
276 op_array, build_flags, opline, (opline-1)->op1.var, &val2); in place_essa_pis()
283 op_array, build_flags, opline, (opline-1)->op2.var, &val1); in place_essa_pis()
342 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
345 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
349 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
352 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
357 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
361 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
365 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var1))) { in place_essa_pis()
369 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var1))) { in place_essa_pis()
377 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
380 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
384 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
387 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
392 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
396 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
400 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var2))) { in place_essa_pis()
404 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var2))) { in place_essa_pis()
418 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
421 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
425 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
428 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
439 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
443 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
450 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
456 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
485 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
488 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
492 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
495 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
512 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
521 static int zend_ssa_rename(const zend_op_array *op_array, uint32_t build_flags, zend_ssa *ssa, int … in zend_ssa_rename() argument
534 tmp = do_alloca(sizeof(int) * (op_array->last_var + op_array->T), use_heap); in zend_ssa_rename()
535 memcpy(tmp, var, sizeof(int) * (op_array->last_var + op_array->T)); in zend_ssa_rename()
553 opline = op_array->opcodes + blocks[n].start; in zend_ssa_rename()
556 uint32_t k = opline - op_array->opcodes; in zend_ssa_rename()
747 && ((op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE) in zend_ssa_rename()
836 if (zend_ssa_rename(op_array, build_flags, ssa, var, j) != SUCCESS) in zend_ssa_rename()
849 int zend_build_ssa(zend_arena **arena, const zend_script *script, const zend_op_array *op_array, ui… in zend_build_ssa() argument
862 if ((blocks_count * (op_array->last_var + op_array->T)) > 4 * 1024 * 1024) { in zend_build_ssa()
875 dfg.vars = op_array->last_var + op_array->T; in zend_build_ssa()
884 if (zend_build_dfg(op_array, &ssa->cfg, &dfg, build_flags) != SUCCESS) { in zend_build_ssa()
890 zend_dump_dfg(op_array, &ssa->cfg, &dfg); in zend_build_ssa()
902 place_essa_pis(arena, script, op_array, build_flags, ssa, &dfg); in zend_build_ssa()
937 var = do_alloca(sizeof(int) * (op_array->last_var + op_array->T), var_use_heap); in zend_build_ssa()
979 zend_dump_phi_placement(op_array, ssa); in zend_build_ssa()
983 ssa->ops = zend_arena_calloc(arena, op_array->last, sizeof(zend_ssa_op)); in zend_build_ssa()
984 memset(ssa->ops, 0xff, op_array->last * sizeof(zend_ssa_op)); in zend_build_ssa()
985 memset(var + op_array->last_var, 0xff, op_array->T * sizeof(int)); in zend_build_ssa()
987 for (j = 0; j < op_array->last_var; j++) { in zend_build_ssa()
990 ssa->vars_count = op_array->last_var; in zend_build_ssa()
991 if (zend_ssa_rename(op_array, build_flags, ssa, var, 0) != SUCCESS) { in zend_build_ssa()
1004 int zend_ssa_compute_use_def_chains(zend_arena **arena, const zend_op_array *op_array, zend_ssa *ss… in zend_ssa_compute_use_def_chains() argument
1014 for (i = 0; i < op_array->last_var; i++) { in zend_ssa_compute_use_def_chains()
1020 for (i = op_array->last_var; i < ssa->vars_count; i++) { in zend_ssa_compute_use_def_chains()
1027 for (i = op_array->last - 1; i >= 0; i--) { in zend_ssa_compute_use_def_chains()
1043 ssa_vars[op->op1_def].var = EX_VAR_TO_NUM(op_array->opcodes[i].op1.var); in zend_ssa_compute_use_def_chains()
1047 ssa_vars[op->op2_def].var = EX_VAR_TO_NUM(op_array->opcodes[i].op2.var); in zend_ssa_compute_use_def_chains()
1051 ssa_vars[op->result_def].var = EX_VAR_TO_NUM(op_array->opcodes[i].result.var); in zend_ssa_compute_use_def_chains()