}
gimple g;
- vec<tree> *args;
/* The maximum number used by any start_ix, without varargs. */
- unsigned int argcnt = 11;
-
- vec_alloc (args, argcnt);
- args->quick_push (device);
+ auto_vec<tree, 11> args;
+ args.quick_push (device);
if (offloaded)
- args->quick_push (build_fold_addr_expr (child_fn));
+ args.quick_push (build_fold_addr_expr (child_fn));
switch (start_ix)
{
case BUILT_IN_GOMP_TARGET:
case BUILT_IN_GOMP_TARGET_UPDATE:
/* This const void * is part of the current ABI, but we're not actually
using it. */
- args->quick_push (build_zero_cst (ptr_type_node));
+ args.quick_push (build_zero_cst (ptr_type_node));
break;
case BUILT_IN_GOACC_DATA_START:
case BUILT_IN_GOACC_ENTER_EXIT_DATA:
default:
gcc_unreachable ();
}
- args->quick_push (t1);
- args->quick_push (t2);
- args->quick_push (t3);
- args->quick_push (t4);
+ args.quick_push (t1);
+ args.quick_push (t2);
+ args.quick_push (t3);
+ args.quick_push (t4);
switch (start_ix)
{
case BUILT_IN_GOACC_DATA_START:
t_vector_length = fold_convert_loc (OMP_CLAUSE_LOCATION (c),
integer_type_node,
OMP_CLAUSE_VECTOR_LENGTH_EXPR (c));
- args->quick_push (t_num_gangs);
- args->quick_push (t_num_workers);
- args->quick_push (t_vector_length);
+ args.quick_push (t_num_gangs);
+ args.quick_push (t_num_workers);
+ args.quick_push (t_vector_length);
}
/* FALLTHRU */
case BUILT_IN_GOACC_ENTER_EXIT_DATA:
integer_type_node,
OMP_CLAUSE_ASYNC_EXPR (c));
- args->quick_push (t_async);
+ args.quick_push (t_async);
/* Save the index, and... */
- t_wait_idx = args->length ();
+ t_wait_idx = args.length ();
/* ... push a default value. */
- args->quick_push (fold_convert_loc (gimple_location (entry_stmt),
- integer_type_node,
- integer_zero_node));
+ args.quick_push (fold_convert_loc (gimple_location (entry_stmt),
+ integer_type_node,
+ integer_zero_node));
c = find_omp_clause (clauses, OMP_CLAUSE_WAIT);
if (c)
{
{
if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_WAIT)
{
- args->safe_push (fold_convert_loc (OMP_CLAUSE_LOCATION (c),
- integer_type_node,
- OMP_CLAUSE_WAIT_EXPR (c)));
+ args.safe_push (fold_convert_loc (OMP_CLAUSE_LOCATION (c),
+ integer_type_node,
+ OMP_CLAUSE_WAIT_EXPR (c)));
n++;
}
}
/* Now that we know the number, replace the default value. */
- args->ordered_remove (t_wait_idx);
- args->quick_insert (t_wait_idx,
- fold_convert_loc (gimple_location (entry_stmt),
- integer_type_node,
- build_int_cst (integer_type_node, n)));
+ args.ordered_remove (t_wait_idx);
+ args.quick_insert (t_wait_idx,
+ fold_convert_loc (gimple_location (entry_stmt),
+ integer_type_node,
+ build_int_cst (integer_type_node, n)));
}
}
break;
gcc_unreachable ();
}
- g = gimple_build_call_vec (builtin_decl_explicit (start_ix), *args);
- args->release ();
+ g = gimple_build_call_vec (builtin_decl_explicit (start_ix), args);
gimple_set_location (g, gimple_location (entry_stmt));
gsi_insert_before (&gsi, g, GSI_SAME_STMT);
if (!offloaded)