diff options
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 0afbcde91c2..b7e28048398 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -519,13 +519,13 @@ struct ifc_dr { static bool memrefs_read_or_written_unconditionally (gimple stmt, - VEC (data_reference_p, heap) *drs) + vec<data_reference_p> drs) { int i, j; data_reference_p a, b; tree ca = bb_predicate (gimple_bb (stmt)); - for (i = 0; VEC_iterate (data_reference_p, drs, i, a); i++) + for (i = 0; drs.iterate (i, &a); i++) if (DR_STMT (a) == stmt) { bool found = false; @@ -537,7 +537,7 @@ memrefs_read_or_written_unconditionally (gimple stmt, if (x == 1) continue; - for (j = 0; VEC_iterate (data_reference_p, drs, j, b); j++) + for (j = 0; drs.iterate (j, &b); j++) { tree ref_base_a = DR_REF (a); tree ref_base_b = DR_REF (b); @@ -591,13 +591,13 @@ memrefs_read_or_written_unconditionally (gimple stmt, static bool write_memrefs_written_at_least_once (gimple stmt, - VEC (data_reference_p, heap) *drs) + vec<data_reference_p> drs) { int i, j; data_reference_p a, b; tree ca = bb_predicate (gimple_bb (stmt)); - for (i = 0; VEC_iterate (data_reference_p, drs, i, a); i++) + for (i = 0; drs.iterate (i, &a); i++) if (DR_STMT (a) == stmt && DR_IS_WRITE (a)) { @@ -610,7 +610,7 @@ write_memrefs_written_at_least_once (gimple stmt, if (x == 1) continue; - for (j = 0; VEC_iterate (data_reference_p, drs, j, b); j++) + for (j = 0; drs.iterate (j, &b); j++) if (DR_STMT (b) != stmt && DR_IS_WRITE (b) && same_data_refs_base_objects (a, b)) @@ -658,7 +658,7 @@ write_memrefs_written_at_least_once (gimple stmt, iteration unconditionally. */ static bool -ifcvt_memrefs_wont_trap (gimple stmt, VEC (data_reference_p, heap) *refs) +ifcvt_memrefs_wont_trap (gimple stmt, vec<data_reference_p> refs) { return write_memrefs_written_at_least_once (stmt, refs) && memrefs_read_or_written_unconditionally (stmt, refs); @@ -669,7 +669,7 @@ ifcvt_memrefs_wont_trap (gimple stmt, VEC (data_reference_p, heap) *refs) not trap in the innermost loop containing STMT. */ static bool -ifcvt_could_trap_p (gimple stmt, VEC (data_reference_p, heap) *refs) +ifcvt_could_trap_p (gimple stmt, vec<data_reference_p> refs) { if (gimple_vuse (stmt) && !gimple_could_trap_p_1 (stmt, false, false) @@ -688,7 +688,7 @@ ifcvt_could_trap_p (gimple stmt, VEC (data_reference_p, heap) *refs) static bool if_convertible_gimple_assign_stmt_p (gimple stmt, - VEC (data_reference_p, heap) *refs) + vec<data_reference_p> refs) { tree lhs = gimple_assign_lhs (stmt); basic_block bb; @@ -756,7 +756,7 @@ if_convertible_gimple_assign_stmt_p (gimple stmt, - it is a GIMPLE_LABEL or a GIMPLE_COND. */ static bool -if_convertible_stmt_p (gimple stmt, VEC (data_reference_p, heap) *refs) +if_convertible_stmt_p (gimple stmt, vec<data_reference_p> refs) { switch (gimple_code (stmt)) { @@ -1070,9 +1070,9 @@ predicate_bbs (loop_p loop) static bool if_convertible_loop_p_1 (struct loop *loop, - VEC (loop_p, heap) **loop_nest, - VEC (data_reference_p, heap) **refs, - VEC (ddr_p, heap) **ddrs) + vec<loop_p> *loop_nest, + vec<data_reference_p> *refs, + vec<ddr_p> *ddrs) { bool res; unsigned int i; @@ -1115,7 +1115,7 @@ if_convertible_loop_p_1 (struct loop *loop, { data_reference_p dr; - for (i = 0; VEC_iterate (data_reference_p, *refs, i, dr); i++) + for (i = 0; refs->iterate (i, &dr); i++) { dr->aux = XNEW (struct ifc_dr); DR_WRITTEN_AT_LEAST_ONCE (dr) = -1; @@ -1159,9 +1159,9 @@ if_convertible_loop_p (struct loop *loop) edge e; edge_iterator ei; bool res = false; - VEC (data_reference_p, heap) *refs; - VEC (ddr_p, heap) *ddrs; - VEC (loop_p, heap) *loop_nest; + vec<data_reference_p> refs; + vec<ddr_p> ddrs; + vec<loop_p> loop_nest; /* Handle only innermost loop. */ if (!loop || loop->inner) @@ -1193,9 +1193,9 @@ if_convertible_loop_p (struct loop *loop) if (loop_exit_edge_p (loop, e)) return false; - refs = VEC_alloc (data_reference_p, heap, 5); - ddrs = VEC_alloc (ddr_p, heap, 25); - loop_nest = VEC_alloc (loop_p, heap, 3); + refs.create (5); + ddrs.create (25); + loop_nest.create (3); res = if_convertible_loop_p_1 (loop, &loop_nest, &refs, &ddrs); if (flag_tree_loop_if_convert_stores) @@ -1203,11 +1203,11 @@ if_convertible_loop_p (struct loop *loop) data_reference_p dr; unsigned int i; - for (i = 0; VEC_iterate (data_reference_p, refs, i, dr); i++) + for (i = 0; refs.iterate (i, &dr); i++) free (dr->aux); } - VEC_free (loop_p, heap, loop_nest); + loop_nest.release (); free_data_refs (refs); free_dependence_relations (ddrs); return res; |