find_func_aliases_for_builtin_call (struct function *fn, gimple t)
{
tree fndecl = gimple_call_fndecl (t);
- vec<ce_s> lhsc = vNULL;
- vec<ce_s> rhsc = vNULL;
+ auto_vec<ce_s, 2> lhsc;
+ auto_vec<ce_s, 4> rhsc;
varinfo_t fi;
if (gimple_call_builtin_p (t, BUILT_IN_NORMAL))
else
get_constraint_for (dest, &rhsc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
+ lhsc.truncate (0);
+ rhsc.truncate (0);
}
get_constraint_for_ptr_offset (dest, NULL_TREE, &lhsc);
get_constraint_for_ptr_offset (src, NULL_TREE, &rhsc);
do_deref (&lhsc);
do_deref (&rhsc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
return true;
}
case BUILT_IN_MEMSET:
get_constraint_for (res, &lhsc);
get_constraint_for (dest, &rhsc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
+ lhsc.truncate (0);
}
get_constraint_for_ptr_offset (dest, NULL_TREE, &lhsc);
do_deref (&lhsc);
ac.offset = 0;
FOR_EACH_VEC_ELT (lhsc, i, lhsp)
process_constraint (new_constraint (*lhsp, ac));
- lhsc.release ();
return true;
}
case BUILT_IN_POSIX_MEMALIGN:
tmpc.type = ADDRESSOF;
rhsc.safe_push (tmpc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
return true;
}
case BUILT_IN_ASSUME_ALIGNED:
get_constraint_for (res, &lhsc);
get_constraint_for (dest, &rhsc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
}
return true;
}
do_deref (&lhsc);
do_deref (&rhsc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
+ lhsc.truncate (0);
+ rhsc.truncate (0);
/* For realloc the resulting pointer can be equal to the
argument as well. But only doing this wouldn't be
correct because with ptr == 0 realloc behaves like malloc. */
get_constraint_for (gimple_call_lhs (t), &lhsc);
get_constraint_for (gimple_call_arg (t, 0), &rhsc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
}
return true;
}
rhsc.safe_push (nul);
get_constraint_for (gimple_call_lhs (t), &lhsc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
}
return true;
/* Trampolines are special - they set up passing the static
lhs = get_function_part_constraint (nfi, fi_static_chain);
get_constraint_for (frame, &rhsc);
FOR_EACH_VEC_ELT (rhsc, i, rhsp)
- process_constraint (new_constraint (lhs, *rhsp));
- rhsc.release ();
+ process_constraint (new_constraint (lhs, *rhsp));
+ rhsc.truncate (0);
/* Make the frame point to the function for
the trampoline adjustment call. */
do_deref (&lhsc);
get_constraint_for (nfunc, &rhsc);
process_all_all_constraints (lhsc, rhsc);
- rhsc.release ();
- lhsc.release ();
return true;
}
get_constraint_for (tramp, &rhsc);
do_deref (&rhsc);
process_all_all_constraints (lhsc, rhsc);
- rhsc.release ();
- lhsc.release ();
}
return true;
}
do_deref (&lhsc);
get_constraint_for (src, &rhsc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
return true;
}
CASE_BUILT_IN_TM_LOAD (1):
get_constraint_for (addr, &rhsc);
do_deref (&rhsc);
process_all_all_constraints (lhsc, rhsc);
- lhsc.release ();
- rhsc.release ();
return true;
}
/* Variadic argument handling needs to be handled in IPA
}
FOR_EACH_VEC_ELT (lhsc, i, lhsp)
process_constraint (new_constraint (*lhsp, rhs));
- lhsc.release ();
/* va_list is clobbered. */
make_constraint_to (get_call_clobber_vi (t)->id, valist);
return true;
find_func_aliases_for_call (struct function *fn, gimple t)
{
tree fndecl = gimple_call_fndecl (t);
- vec<ce_s> lhsc = vNULL;
- vec<ce_s> rhsc = vNULL;
varinfo_t fi;
if (fndecl != NULL_TREE
if (!in_ipa_mode
|| (fndecl && !fi->is_fn_info))
{
- vec<ce_s> rhsc = vNULL;
+ auto_vec<ce_s, 16> rhsc;
int flags = gimple_call_flags (t);
/* Const functions can return their arguments and addresses
if (gimple_call_lhs (t))
handle_lhs_call (t, gimple_call_lhs (t),
gimple_call_return_flags (t), rhsc, fndecl);
- rhsc.release ();
}
else
{
+ auto_vec<ce_s, 2> rhsc;
tree lhsop;
unsigned j;
lhsop = gimple_call_lhs (t);
if (lhsop)
{
+ auto_vec<ce_s, 2> lhsc;
struct constraint_expr rhs;
struct constraint_expr *lhsp;
&& DECL_RESULT (fndecl)
&& DECL_BY_REFERENCE (DECL_RESULT (fndecl)))
{
- vec<ce_s> tem = vNULL;
- tem.safe_push (rhs);
+ auto_vec<ce_s, 2> tem;
+ tem.quick_push (rhs);
do_deref (&tem);
+ gcc_checking_assert (tem.length () == 1);
rhs = tem[0];
- tem.release ();
}
FOR_EACH_VEC_ELT (lhsc, j, lhsp)
process_constraint (new_constraint (*lhsp, rhs));
lhs = get_function_part_constraint (fi, fi_result);
FOR_EACH_VEC_ELT (rhsc, j, rhsp)
process_constraint (new_constraint (lhs, *rhsp));
- rhsc.release ();
+ rhsc.truncate (0);
}
/* If we use a static chain, pass it along. */
find_func_aliases (struct function *fn, gimple origt)
{
gimple t = origt;
- vec<ce_s> lhsc = vNULL;
- vec<ce_s> rhsc = vNULL;
+ auto_vec<ce_s, 16> lhsc;
+ auto_vec<ce_s, 16> rhsc;
struct constraint_expr *c;
varinfo_t fi;
else if (code == COND_EXPR)
{
/* The result is a merge of both COND_EXPR arms. */
- vec<ce_s> tmp = vNULL;
+ auto_vec<ce_s, 2> tmp;
struct constraint_expr *rhsp;
unsigned i;
get_constraint_for_rhs (gimple_assign_rhs2 (t), &rhsc);
get_constraint_for_rhs (gimple_assign_rhs3 (t), &tmp);
FOR_EACH_VEC_ELT (tmp, i, rhsp)
rhsc.safe_push (*rhsp);
- tmp.release ();
}
else if (truth_value_p (code))
/* Truth value results are not pointer (parts). Or at least
else
{
/* All other operations are merges. */
- vec<ce_s> tmp = vNULL;
+ auto_vec<ce_s, 4> tmp;
struct constraint_expr *rhsp;
unsigned i, j;
get_constraint_for_rhs (gimple_assign_rhs1 (t), &rhsc);
rhsc.safe_push (*rhsp);
tmp.truncate (0);
}
- tmp.release ();
}
process_all_all_constraints (lhsc, rhsc);
}
any global memory. */
if (op)
{
- vec<ce_s> lhsc = vNULL;
+ auto_vec<ce_s, 2> lhsc;
struct constraint_expr rhsc, *lhsp;
unsigned j;
get_constraint_for (op, &lhsc);
rhsc.type = SCALAR;
FOR_EACH_VEC_ELT (lhsc, j, lhsp)
process_constraint (new_constraint (*lhsp, rhsc));
- lhsc.release ();
}
}
for (i = 0; i < gimple_asm_ninputs (t); ++i)
make_escape_constraint (op);
}
}
-
- rhsc.release ();
- lhsc.release ();
}
find_func_clobbers (struct function *fn, gimple origt)
{
gimple t = origt;
- vec<ce_s> lhsc = vNULL;
- auto_vec<ce_s> rhsc;
+ auto_vec<ce_s, 16> lhsc;
+ auto_vec<ce_s, 16> rhsc;
varinfo_t fi;
/* Add constraints for clobbered/used in IPA mode.
get_constraint_for_address_of (lhs, &rhsc);
FOR_EACH_VEC_ELT (rhsc, i, rhsp)
process_constraint (new_constraint (lhsc, *rhsp));
- rhsc.release ();
+ rhsc.truncate (0);
}
}
get_constraint_for_address_of (rhs, &rhsc);
FOR_EACH_VEC_ELT (rhsc, i, rhsp)
process_constraint (new_constraint (lhs, *rhsp));
- rhsc.release ();
+ rhsc.truncate (0);
}
}
lhs = get_function_part_constraint (fi, fi_clobbers);
FOR_EACH_VEC_ELT (lhsc, i, lhsp)
process_constraint (new_constraint (lhs, *lhsp));
- lhsc.release ();
get_constraint_for_ptr_offset (src, NULL_TREE, &rhsc);
lhs = get_function_part_constraint (fi, fi_uses);
FOR_EACH_VEC_ELT (rhsc, i, rhsp)
process_constraint (new_constraint (lhs, *rhsp));
- rhsc.release ();
return;
}
/* The following function clobbers memory pointed to by
lhs = get_function_part_constraint (fi, fi_clobbers);
FOR_EACH_VEC_ELT (lhsc, i, lhsp)
process_constraint (new_constraint (lhs, *lhsp));
- lhsc.release ();
return;
}
/* The following functions clobber their second and third
get_constraint_for_address_of (arg, &rhsc);
FOR_EACH_VEC_ELT (rhsc, j, rhsp)
process_constraint (new_constraint (lhs, *rhsp));
- rhsc.release ();
}
/* Build constraints for propagating clobbers/uses along the