typedef struct chain
{
+ chain (chain_type t) : type (t), op (ERROR_MARK), rslt_type (NULL_TREE),
+ ch1 (NULL), ch2 (NULL), length (0), init_seq (NULL), fini_seq (NULL),
+ has_max_use_after (false), all_always_accessed (false), combined (false),
+ inv_store_elimination (false) {}
+
/* Type of the chain. */
enum chain_type type;
struct component
{
+ component (bool es) : eliminate_store_p (es), next (NULL) {}
+
/* The references in the component. */
auto_vec<dref> refs;
if (chain->fini_seq)
gimple_seq_discard (chain->fini_seq);
- free (chain);
+ delete chain;
}
/* Frees CHAINS. */
for (act = comps; act; act = next)
{
next = act->next;
- XDELETE (act);
+ delete act;
}
}
comp = comps[ca];
if (!comp)
{
- comp = XCNEW (struct component);
- comp->refs.create (comp_size[ca]);
- comp->eliminate_store_p = eliminate_store_p;
+ comp = new component (eliminate_store_p);
+ comp->refs.reserve_exact (comp_size[ca]);
comps[ca] = comp;
}
*comp = act->next;
FOR_EACH_VEC_ELT (act->refs, i, ref)
free (ref);
- XDELETE (act);
+ delete act;
}
}
static chain_p
make_invariant_chain (struct component *comp)
{
- chain_p chain = XCNEW (struct chain);
+ chain_p chain = new struct chain (CT_INVARIANT);
unsigned i;
dref ref;
- chain->type = CT_INVARIANT;
-
chain->all_always_accessed = true;
FOR_EACH_VEC_ELT (comp->refs, i, ref)
static chain_p
make_rooted_chain (dref ref, enum chain_type type)
{
- chain_p chain = XCNEW (struct chain);
+ chain_p chain = new struct chain (type);
- chain->type = type;
chain->refs.safe_push (ref);
chain->all_always_accessed = ref->always_accessed;
ref->distance = 0;
if (swap)
std::swap (ch1, ch2);
- new_chain = XCNEW (struct chain);
- new_chain->type = CT_COMBINATION;
+ new_chain = new struct chain (CT_COMBINATION);
new_chain->op = op;
new_chain->ch1 = ch1;
new_chain->ch2 = ch2;
scalar_dest = gimple_get_lhs (orig_stmt_info->stmt);
scalar_type = TREE_TYPE (scalar_dest);
- scalar_results.create (group_size);
+ scalar_results.truncate (0);
+ scalar_results.reserve_exact (group_size);
new_scalar_dest = vect_create_destination_var (scalar_dest, NULL);
bitsize = TYPE_SIZE (scalar_type);