Lines Matching refs:var
45 …i(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa *ssa, int from, int to, int var) /* {{{ */ in needs_pi() argument
50 if (!DFG_ISSET(dfg->in, dfg->size, to, var)) { in needs_pi()
72 int from, int to, int var) /* {{{ */ in add_pi() argument
75 if (!needs_pi(op_array, dfg, ssa, from, to, var)) { in add_pi()
88 phi->var = var; in add_pi()
96 DFG_SET(dfg->def, dfg->size, to, var); in add_pi()
102 DFG_SET(dfg->use, dfg->size, to, var); in add_pi()
127 static inline void pi_range_equals(zend_ssa_phi *phi, int var, zend_long val) { in pi_range_equals() argument
128 pi_range(phi, var, var, val, val, 0, 0, 0); in pi_range_equals()
130 static inline void pi_range_not_equals(zend_ssa_phi *phi, int var, zend_long val) { in pi_range_not_equals() argument
131 pi_range(phi, var, var, val, val, 0, 0, 1); in pi_range_not_equals()
133 static inline void pi_range_min(zend_ssa_phi *phi, int var, zend_long val) { in pi_range_min() argument
134 pi_range(phi, var, -1, val, ZEND_LONG_MAX, 0, 1, 0); in pi_range_min()
136 static inline void pi_range_max(zend_ssa_phi *phi, int var, zend_long val) { in pi_range_max() argument
137 pi_range(phi, -1, var, ZEND_LONG_MIN, val, 1, 0, 0); in pi_range_max()
172 if (op->result_type != IS_TMP_VAR || op->result.var != var_num) { in find_adjusted_tmp_var()
179 return EX_VAR_TO_NUM(op->op1.var); in find_adjusted_tmp_var()
184 return EX_VAR_TO_NUM(op->op1.var); in find_adjusted_tmp_var()
192 return EX_VAR_TO_NUM(op->op1.var); in find_adjusted_tmp_var()
199 return EX_VAR_TO_NUM(op->op2.var); in find_adjusted_tmp_var()
207 return EX_VAR_TO_NUM(op->op1.var); in find_adjusted_tmp_var()
265 opline->op1.var == (opline-1)->result.var) { in place_essa_pis()
273 var1 = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis()
276 op_array, build_flags, opline, (opline-1)->op1.var, &val2); in place_essa_pis()
280 var2 = EX_VAR_TO_NUM((opline-1)->op2.var); in place_essa_pis()
283 op_array, build_flags, opline, (opline-1)->op2.var, &val1); in place_essa_pis()
413 opline->op1.var == (opline-1)->result.var && in place_essa_pis()
415 int var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis() local
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()
435 opline->op1.var == (opline-1)->result.var && in place_essa_pis()
437 int var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis() local
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()
447 opline->op1.var == (opline-1)->result.var && (opline-1)->op1_type == IS_CV) { in place_essa_pis()
448 int var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis() local
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()
463 opline->op1.var == (opline-1)->result.var) { in place_essa_pis()
464 int var; in place_essa_pis() local
468 var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis()
471 var = EX_VAR_TO_NUM((opline-1)->op2.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()
500 opline->op1.var == (opline-1)->result.var && (opline-1)->op1_type == IS_CV && in place_essa_pis()
502 int var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis() local
512 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
521 …name(const zend_op_array *op_array, uint32_t build_flags, zend_ssa *ssa, int *var, int n) /* {{{ */ in zend_ssa_rename() argument
535 memcpy(tmp, var, sizeof(int) * (op_array->last_var + op_array->T)); in zend_ssa_rename()
536 var = tmp; in zend_ssa_rename()
544 var[phi->var] = ssa_vars_count; in zend_ssa_rename()
547 var[phi->var] = phi->ssa_var; in zend_ssa_rename()
561 ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)]; in zend_ssa_rename()
564 ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)]; in zend_ssa_rename()
568 ssa_ops[k + 1].op2_use = var[EX_VAR_TO_NUM(next->op2.var)]; in zend_ssa_rename()
571 ssa_ops[k + 1].op2_use = var[EX_VAR_TO_NUM(next->op2.var)]; in zend_ssa_rename()
576 ssa_ops[k].op1_use = var[EX_VAR_TO_NUM(opline->op1.var)]; in zend_ssa_rename()
581 ssa_ops[k].op2_use = var[EX_VAR_TO_NUM(opline->op2.var)]; in zend_ssa_rename()
584 var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count; in zend_ssa_rename()
588 ssa_ops[k].op2_use = var[EX_VAR_TO_NUM(opline->op2.var)]; in zend_ssa_rename()
595 var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count; in zend_ssa_rename()
601 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
610 var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count; in zend_ssa_rename()
616 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
625 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
634 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
640 var[EX_VAR_TO_NUM(next->op1.var)] = ssa_vars_count; in zend_ssa_rename()
646 ssa_ops[k].result_use = var[EX_VAR_TO_NUM(opline->result.var)]; in zend_ssa_rename()
652 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
664 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
678 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
686 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
709 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
717 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
733 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
741 var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count; in zend_ssa_rename()
750 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
757 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in zend_ssa_rename()
767 var[EX_VAR_TO_NUM(opline->result.var)] = ssa_vars_count; in zend_ssa_rename()
772 var[EX_VAR_TO_NUM(opline->result.var)] = ssa_vars_count; in zend_ssa_rename()
788 p->constraint.range.min_ssa_var = var[p->constraint.range.min_var]; in zend_ssa_rename()
791 p->constraint.range.max_ssa_var = var[p->constraint.range.max_var]; in zend_ssa_rename()
795 p->sources[j] = var[p->var]; in zend_ssa_rename()
808 p->sources[j] = var[p->var]; in zend_ssa_rename()
815 if (q->pi < 0 && q->var == p->var) { in zend_ssa_rename()
836 if (zend_ssa_rename(op_array, build_flags, ssa, var, j) != SUCCESS) in zend_ssa_rename()
856 int *var = NULL; in zend_build_ssa() local
937 var = do_alloca(sizeof(int) * (op_array->last_var + op_array->T), var_use_heap); in zend_build_ssa()
938 if (!var) { in zend_build_ssa()
959 phi->var = i; in zend_build_ssa()
985 memset(var + op_array->last_var, 0xff, op_array->T * sizeof(int)); in zend_build_ssa()
988 var[j] = j; in zend_build_ssa()
991 if (zend_ssa_rename(op_array, build_flags, ssa, var, 0) != SUCCESS) { in zend_build_ssa()
992 free_alloca(var, var_use_heap); in zend_build_ssa()
997 free_alloca(var, var_use_heap); in zend_build_ssa()
1015 ssa_vars[i].var = i; in zend_ssa_compute_use_def_chains()
1021 ssa_vars[i].var = -1; 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()
1060 ssa_vars[phi->ssa_var].var = phi->var; in zend_ssa_compute_use_def_chains()
1108 int zend_ssa_unlink_use_chain(zend_ssa *ssa, int op, int var) /* {{{ */ in zend_ssa_unlink_use_chain() argument
1110 if (ssa->vars[var].use_chain == op) { in zend_ssa_unlink_use_chain()
1111 ssa->vars[var].use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain()
1114 int use = ssa->vars[var].use_chain; in zend_ssa_unlink_use_chain()
1117 if (ssa->ops[use].result_use == var) { in zend_ssa_unlink_use_chain()
1119 ssa->ops[use].res_use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain()
1124 } else if (ssa->ops[use].op1_use == var) { in zend_ssa_unlink_use_chain()
1126 ssa->ops[use].op1_use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain()
1131 } else if (ssa->ops[use].op2_use == var) { in zend_ssa_unlink_use_chain()
1133 ssa->ops[use].op2_use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain()