Lines Matching refs:var

36 		int other_successor, int exclude, int var) {  in will_rejoin()  argument
47 if (DFG_ISSET(dfg->def, dfg->size, predecessor, var)) { in will_rejoin()
60 …_op_array *op_array, const zend_dfg *dfg, const zend_ssa *ssa, int from, int to, int var) /* {{{ */ in needs_pi() argument
65 if (!DFG_ISSET(dfg->in, dfg->size, to, var)) { in needs_pi()
88 return !will_rejoin(&ssa->cfg, dfg, to_block, other_successor, from, var); in needs_pi()
94 int from, int to, int var) /* {{{ */ in add_pi() argument
97 if (!needs_pi(op_array, dfg, ssa, from, to, var)) { in add_pi()
110 phi->var = var; in add_pi()
118 DFG_SET(dfg->def, dfg->size, to, var); in add_pi()
124 DFG_SET(dfg->use, dfg->size, to, var); in add_pi()
149 static inline void pi_range_equals(zend_ssa_phi *phi, int var, zend_long val) { in pi_range_equals() argument
150 pi_range(phi, var, var, val, val, 0, 0, 0); in pi_range_equals()
152 static inline void pi_range_not_equals(zend_ssa_phi *phi, int var, zend_long val) { in pi_range_not_equals() argument
153 pi_range(phi, var, var, val, val, 0, 0, 1); in pi_range_not_equals()
155 static inline void pi_range_min(zend_ssa_phi *phi, int var, zend_long val) { in pi_range_min() argument
156 pi_range(phi, var, -1, val, ZEND_LONG_MAX, 0, 1, 0); in pi_range_min()
158 static inline void pi_range_max(zend_ssa_phi *phi, int var, zend_long val) { in pi_range_max() argument
159 pi_range(phi, -1, var, ZEND_LONG_MIN, val, 1, 0, 0); in pi_range_max()
192 if (op->result_type != IS_TMP_VAR || op->result.var != var_num) { in find_adjusted_tmp_var()
199 return EX_VAR_TO_NUM(op->op1.var); in find_adjusted_tmp_var()
204 return EX_VAR_TO_NUM(op->op1.var); in find_adjusted_tmp_var()
212 return EX_VAR_TO_NUM(op->op1.var); in find_adjusted_tmp_var()
219 return EX_VAR_TO_NUM(op->op2.var); in find_adjusted_tmp_var()
227 return EX_VAR_TO_NUM(op->op1.var); in find_adjusted_tmp_var()
269 int var = EX_VAR_TO_NUM(opline->op1.var); in place_essa_pis() local
270 if ((pi = add_pi(arena, op_array, dfg, ssa, j, blocks[j].successors[0], var))) { in place_essa_pis()
277 int var = EX_VAR_TO_NUM(opline->op1.var); in place_essa_pis() local
278 if ((pi = add_pi(arena, op_array, dfg, ssa, j, blocks[j].successors[1], var))) { in place_essa_pis()
299 opline->op1.var == (opline-1)->result.var) { in place_essa_pis()
307 var1 = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis()
310 op_array, build_flags, opline, (opline-1)->op1.var, &val2); in place_essa_pis()
314 var2 = EX_VAR_TO_NUM((opline-1)->op2.var); in place_essa_pis()
317 op_array, build_flags, opline, (opline-1)->op2.var, &val1); in place_essa_pis()
439 opline->op1.var == (opline-1)->result.var && in place_essa_pis()
441 int var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis() local
444 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
447 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
451 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
454 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
461 opline->op1.var == (opline-1)->result.var && in place_essa_pis()
463 int var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis() local
465 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
469 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
473 opline->op1.var == (opline-1)->result.var && (opline-1)->op1_type == IS_CV) { in place_essa_pis()
474 int var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis() local
476 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
481 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
488 opline->op1.var == (opline-1)->result.var) { in place_essa_pis()
489 int var; in place_essa_pis() local
493 var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis()
496 var = EX_VAR_TO_NUM((opline-1)->op2.var); in place_essa_pis()
510 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
513 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
517 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bf, var))) { in place_essa_pis()
520 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
525 opline->op1.var == (opline-1)->result.var && (opline-1)->op1_type == IS_CV && in place_essa_pis()
527 int var = EX_VAR_TO_NUM((opline-1)->op1.var); in place_essa_pis() local
534 if ((pi = add_pi(arena, op_array, dfg, ssa, j, bt, var))) { in place_essa_pis()
543 …ne, uint32_t k, uint32_t build_flags, int ssa_vars_count, zend_ssa_op *ssa_ops, int *var) /* {{{ */ in _zend_ssa_rename_op() argument
548 ssa_ops[k].op1_use = var[EX_VAR_TO_NUM(opline->op1.var)]; in _zend_ssa_rename_op()
552 ssa_ops[k].op2_use = var[EX_VAR_TO_NUM(opline->op2.var)]; in _zend_ssa_rename_op()
558 ssa_ops[k].result_use = var[EX_VAR_TO_NUM(opline->result.var)]; in _zend_ssa_rename_op()
566 var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count; in _zend_ssa_rename_op()
573 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
581 var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count; in _zend_ssa_rename_op()
593 ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)]; in _zend_ssa_rename_op()
597 var[EX_VAR_TO_NUM(next->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
604 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
612 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
618 ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)]; in _zend_ssa_rename_op()
622 var[EX_VAR_TO_NUM(next->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
631 ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)]; in _zend_ssa_rename_op()
635 var[EX_VAR_TO_NUM(next->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
644 ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)]; in _zend_ssa_rename_op()
648 var[EX_VAR_TO_NUM(next->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
657 ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)]; in _zend_ssa_rename_op()
665 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
671 ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)]; in _zend_ssa_rename_op()
717 ssa_ops[k].result_use = var[EX_VAR_TO_NUM(opline->result.var)]; in _zend_ssa_rename_op()
720 ssa_ops[k].result_use = var[EX_VAR_TO_NUM(opline->result.var)]; in _zend_ssa_rename_op()
749 var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count; in _zend_ssa_rename_op()
756 var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count; in _zend_ssa_rename_op()
764 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
774 var[EX_VAR_TO_NUM(opline->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
780 var[EX_VAR_TO_NUM(opline->op2.var)] = ssa_vars_count; in _zend_ssa_rename_op()
787 ssa_ops[k + 1].op1_use = var[EX_VAR_TO_NUM(next->op1.var)]; in _zend_ssa_rename_op()
791 var[EX_VAR_TO_NUM(next->op1.var)] = ssa_vars_count; in _zend_ssa_rename_op()
804 var[EX_VAR_TO_NUM(opline->result.var)] = ssa_vars_count; in _zend_ssa_rename_op()
813 …ne, uint32_t k, uint32_t build_flags, int ssa_vars_count, zend_ssa_op *ssa_ops, int *var) /* {{{ */ in zend_ssa_rename_op() argument
815 return _zend_ssa_rename_op(op_array, opline, k, build_flags, ssa_vars_count, ssa_ops, var); in zend_ssa_rename_op()
819 …name(const zend_op_array *op_array, uint32_t build_flags, zend_ssa *ssa, int *var, int n) /* {{{ */ in zend_ssa_rename() argument
833 memcpy(tmp, var, sizeof(int) * (op_array->last_var + op_array->T)); in zend_ssa_rename()
834 var = tmp; in zend_ssa_rename()
842 var[phi->var] = ssa_vars_count; in zend_ssa_rename()
845 var[phi->var] = phi->ssa_var; in zend_ssa_rename()
856 …a_vars_count = _zend_ssa_rename_op(op_array, opline, k, build_flags, ssa_vars_count, ssa_ops, var); in zend_ssa_rename()
872 p->constraint.range.min_ssa_var = var[p->constraint.range.min_var]; in zend_ssa_rename()
875 p->constraint.range.max_ssa_var = var[p->constraint.range.max_var]; in zend_ssa_rename()
879 p->sources[j] = var[p->var]; in zend_ssa_rename()
892 p->sources[j] = var[p->var]; in zend_ssa_rename()
903 if (q->pi < 0 && q->var == p->var) { in zend_ssa_rename()
923 if (zend_ssa_rename(op_array, build_flags, ssa, var, j) == FAILURE) in zend_ssa_rename()
943 int *var = NULL; in zend_build_ssa() local
1017 var = do_alloca(sizeof(int) * (op_array->last_var + op_array->T), var_use_heap); in zend_build_ssa()
1018 if (!var) { in zend_build_ssa()
1039 phi->var = i; in zend_build_ssa()
1065 memset(var + op_array->last_var, 0xff, op_array->T * sizeof(int)); in zend_build_ssa()
1068 var[j] = j; in zend_build_ssa()
1071 if (zend_ssa_rename(op_array, build_flags, ssa, var, 0) == FAILURE) { in zend_build_ssa()
1072 free_alloca(var, var_use_heap); in zend_build_ssa()
1077 free_alloca(var, var_use_heap); in zend_build_ssa()
1095 ssa_vars[i].var = i; in zend_ssa_compute_use_def_chains()
1101 ssa_vars[i].var = -1; in zend_ssa_compute_use_def_chains()
1123 ssa_vars[op->op1_def].var = EX_VAR_TO_NUM(op_array->opcodes[i].op1.var); in zend_ssa_compute_use_def_chains()
1127 ssa_vars[op->op2_def].var = EX_VAR_TO_NUM(op_array->opcodes[i].op2.var); in zend_ssa_compute_use_def_chains()
1131 ssa_vars[op->result_def].var = EX_VAR_TO_NUM(op_array->opcodes[i].result.var); in zend_ssa_compute_use_def_chains()
1140 ssa_vars[phi->ssa_var].var = phi->var; in zend_ssa_compute_use_def_chains()
1195 if (ssa_vars[i].var < op_array->last_var) { in zend_ssa_compute_use_def_chains()
1196 ssa_vars[i].alias = ssa_vars[ssa_vars[i].var].alias; in zend_ssa_compute_use_def_chains()
1202 void zend_ssa_unlink_use_chain(zend_ssa *ssa, int op, int var) /* {{{ */ in zend_ssa_unlink_use_chain() argument
1204 if (ssa->vars[var].use_chain == op) { in zend_ssa_unlink_use_chain()
1205 ssa->vars[var].use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain()
1208 int use = ssa->vars[var].use_chain; in zend_ssa_unlink_use_chain()
1211 if (ssa->ops[use].result_use == var) { in zend_ssa_unlink_use_chain()
1213 ssa->ops[use].res_use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain()
1218 } else if (ssa->ops[use].op1_use == var) { in zend_ssa_unlink_use_chain()
1220 ssa->ops[use].op1_use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain()
1225 } else if (ssa->ops[use].op2_use == var) { in zend_ssa_unlink_use_chain()
1227 ssa->ops[use].op2_use_chain = zend_ssa_next_use(ssa->ops, var, op); in zend_ssa_unlink_use_chain()
1241 void zend_ssa_replace_use_chain(zend_ssa *ssa, int op, int new_op, int var) /* {{{ */ in zend_ssa_replace_use_chain() argument
1243 if (ssa->vars[var].use_chain == op) { in zend_ssa_replace_use_chain()
1244 ssa->vars[var].use_chain = new_op; in zend_ssa_replace_use_chain()
1247 int use = ssa->vars[var].use_chain; in zend_ssa_replace_use_chain()
1250 if (ssa->ops[use].result_use == var) { in zend_ssa_replace_use_chain()
1257 } else if (ssa->ops[use].op1_use == var) { in zend_ssa_replace_use_chain()
1264 } else if (ssa->ops[use].op2_use == var) { in zend_ssa_replace_use_chain()
1312 static inline zend_ssa_phi **zend_ssa_next_use_phi_ptr(zend_ssa *ssa, int var, zend_ssa_phi *p) /* … in zend_ssa_next_use_phi_ptr() argument
1319 if (p->sources[j] == var) { in zend_ssa_next_use_phi_ptr()
1424 zend_ssa_var *var = &ssa->vars[var_num]; in zend_ssa_remove_uses_of_var() local
1427 FOREACH_PHI_USE(var, phi) { in zend_ssa_remove_uses_of_var()
1435 var->phi_use_chain = NULL; in zend_ssa_remove_uses_of_var()
1436 FOREACH_USE(var, use) { in zend_ssa_remove_uses_of_var()
1451 var->use_chain = -1; in zend_ssa_remove_uses_of_var()
1583 static void propagate_phi_type_widening(zend_ssa *ssa, int var) /* {{{ */ in propagate_phi_type_widening() argument
1586 FOREACH_PHI_USE(&ssa->vars[var], phi) { in propagate_phi_type_widening()
1587 if (ssa->var_info[var].type & ~ssa->var_info[phi->ssa_var].type) { in propagate_phi_type_widening()
1588 ssa->var_info[phi->ssa_var].type |= ssa->var_info[var].type; in propagate_phi_type_widening()