aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-prefetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-loop-prefetch.c')
-rw-r--r--gcc/tree-ssa-loop-prefetch.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index dcc65e1..975c0b6 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -1229,13 +1229,13 @@ mark_nontemporal_store (struct mem_ref *ref)
static void
emit_mfence_after_loop (struct loop *loop)
{
- VEC (edge, heap) *exits = get_loop_exit_edges (loop);
+ vec<edge> exits = get_loop_exit_edges (loop);
edge exit;
gimple call;
gimple_stmt_iterator bsi;
unsigned i;
- FOR_EACH_VEC_ELT (edge, exits, i, exit)
+ FOR_EACH_VEC_ELT (exits, i, exit)
{
call = gimple_build_call (FENCE_FOLLOWING_MOVNT, 0);
@@ -1249,7 +1249,7 @@ emit_mfence_after_loop (struct loop *loop)
gsi_insert_before (&bsi, call, GSI_NEW_STMT);
}
- VEC_free (edge, heap, exits);
+ exits.release ();
update_ssa (TODO_update_ssa_only_virtuals);
}
@@ -1267,16 +1267,16 @@ may_use_storent_in_loop_p (struct loop *loop)
is a suitable place for it at each of the loop exits. */
if (FENCE_FOLLOWING_MOVNT != NULL_TREE)
{
- VEC (edge, heap) *exits = get_loop_exit_edges (loop);
+ vec<edge> exits = get_loop_exit_edges (loop);
unsigned i;
edge exit;
- FOR_EACH_VEC_ELT (edge, exits, i, exit)
+ FOR_EACH_VEC_ELT (exits, i, exit)
if ((exit->flags & EDGE_ABNORMAL)
&& exit->dest == EXIT_BLOCK_PTR)
ret = false;
- VEC_free (edge, heap, exits);
+ exits.release ();
}
return ret;
@@ -1471,7 +1471,7 @@ self_reuse_distance (data_reference_p dr, unsigned *loop_sizes, unsigned n,
{
tree stride, access_fn;
HOST_WIDE_INT *strides, astride;
- VEC (tree, heap) *access_fns;
+ vec<tree> access_fns;
tree ref = DR_REF (dr);
unsigned i, ret = ~0u;
@@ -1490,7 +1490,7 @@ self_reuse_distance (data_reference_p dr, unsigned *loop_sizes, unsigned n,
strides = XCNEWVEC (HOST_WIDE_INT, n);
access_fns = DR_ACCESS_FNS (dr);
- FOR_EACH_VEC_ELT (tree, access_fns, i, access_fn)
+ FOR_EACH_VEC_ELT (access_fns, i, access_fn)
{
/* Keep track of the reference corresponding to the subscript, so that we
know its stride. */
@@ -1541,11 +1541,11 @@ determine_loop_nest_reuse (struct loop *loop, struct mem_ref_group *refs,
bool no_other_refs)
{
struct loop *nest, *aloop;
- VEC (data_reference_p, heap) *datarefs = NULL;
- VEC (ddr_p, heap) *dependences = NULL;
+ vec<data_reference_p> datarefs = vec<data_reference_p>();
+ vec<ddr_p> dependences = vec<ddr_p>();
struct mem_ref_group *gr;
struct mem_ref *ref, *refb;
- VEC (loop_p, heap) *vloops = NULL;
+ vec<loop_p> vloops = vec<loop_p>();
unsigned *loop_data_size;
unsigned i, j, n;
unsigned volume, dist, adist;
@@ -1574,7 +1574,7 @@ determine_loop_nest_reuse (struct loop *loop, struct mem_ref_group *refs,
We use this to estimate whether the reference is evicted from the
cache before its reuse. */
find_loop_nest (nest, &vloops);
- n = VEC_length (loop_p, vloops);
+ n = vloops.length ();
loop_data_size = XNEWVEC (unsigned, n);
volume = volume_of_references (refs);
i = n;
@@ -1586,7 +1586,7 @@ determine_loop_nest_reuse (struct loop *loop, struct mem_ref_group *refs,
if (volume > L2_CACHE_SIZE_BYTES)
continue;
- aloop = VEC_index (loop_p, vloops, i);
+ aloop = vloops[i];
vol = estimated_stmt_executions_int (aloop);
if (vol == -1)
vol = expected_loop_iterations (aloop);
@@ -1607,13 +1607,13 @@ determine_loop_nest_reuse (struct loop *loop, struct mem_ref_group *refs,
{
ref->reuse_distance = volume;
dr->aux = ref;
- VEC_safe_push (data_reference_p, heap, datarefs, dr);
+ datarefs.safe_push (dr);
}
else
no_other_refs = false;
}
- FOR_EACH_VEC_ELT (data_reference_p, datarefs, i, dr)
+ FOR_EACH_VEC_ELT (datarefs, i, dr)
{
dist = self_reuse_distance (dr, loop_data_size, n, loop);
ref = (struct mem_ref *) dr->aux;
@@ -1627,7 +1627,7 @@ determine_loop_nest_reuse (struct loop *loop, struct mem_ref_group *refs,
if (!compute_all_dependences (datarefs, &dependences, vloops, true))
return false;
- FOR_EACH_VEC_ELT (ddr_p, dependences, i, dep)
+ FOR_EACH_VEC_ELT (dependences, i, dep)
{
if (DDR_ARE_DEPENDENT (dep) == chrec_known)
continue;