diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2005-04-25 02:33:12 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-04-25 02:33:12 +0000 |
commit | 51d008916adbdcbe39a089f3754f5c3b430c717e (patch) | |
tree | 0ba3673ca9dc521954986763e3a21121fa40893d /gcc | |
parent | eb1093d3721a1435bf078b2356d9a707d1a4752e (diff) | |
download | gcc-51d008916adbdcbe39a089f3754f5c3b430c717e.zip gcc-51d008916adbdcbe39a089f3754f5c3b430c717e.tar.gz gcc-51d008916adbdcbe39a089f3754f5c3b430c717e.tar.bz2 |
tree-vect-analyze.c (vect_mark_relevant): Take VEC(tree,heap) instead of varray_type as an argument.
* tree-vect-analyze.c (vect_mark_relevant): Take
VEC(tree,heap) instead of varray_type as an argument.
(vect_mark_stmts_to_be_vectorized): Change the type of
worklist to VEC(tree,heap). Adjust uses of worklist.
From-SVN: r98695
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-vect-analyze.c | 23 |
2 files changed, 18 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b13087c..72e91c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-04-25 Kazu Hirata <kazu@cs.umass.edu> + + * tree-vect-analyze.c (vect_mark_relevant): Take + VEC(tree,heap) instead of varray_type as an argument. + (vect_mark_stmts_to_be_vectorized): Change the type of + worklist to VEC(tree,heap). Adjust uses of worklist. + 2005-04-24 Devang Patel <dpatel@apple.com> * config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): New. diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c index 46d7673..71f7663 100644 --- a/gcc/tree-vect-analyze.c +++ b/gcc/tree-vect-analyze.c @@ -54,7 +54,7 @@ static bool vect_determine_vectorization_factor (loop_vec_info); /* Utility functions for the analyses. */ static bool exist_non_indexing_operands_for_use_p (tree, tree); -static void vect_mark_relevant (varray_type *, tree); +static void vect_mark_relevant (VEC(tree,heap) **, tree); static bool vect_stmt_relevant_p (tree, loop_vec_info); static tree vect_get_loop_niters (struct loop *, tree *); static bool vect_analyze_data_ref_dependence @@ -2061,7 +2061,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo) Mark STMT as "relevant for vectorization" and add it to WORKLIST. */ static void -vect_mark_relevant (varray_type *worklist, tree stmt) +vect_mark_relevant (VEC(tree,heap) **worklist, tree stmt) { stmt_vec_info stmt_info; @@ -2070,7 +2070,7 @@ vect_mark_relevant (varray_type *worklist, tree stmt) if (TREE_CODE (stmt) == PHI_NODE) { - VARRAY_PUSH_TREE (*worklist, stmt); + VEC_safe_push (tree, heap, *worklist, stmt); return; } @@ -2094,7 +2094,7 @@ vect_mark_relevant (varray_type *worklist, tree stmt) } STMT_VINFO_RELEVANT_P (stmt_info) = 1; - VARRAY_PUSH_TREE (*worklist, stmt); + VEC_safe_push (tree, heap, *worklist, stmt); } @@ -2190,7 +2190,7 @@ vect_stmt_relevant_p (tree stmt, loop_vec_info loop_vinfo) static bool vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) { - varray_type worklist; + VEC(tree,heap) *worklist; struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo); unsigned int nbbs = loop->num_nodes; @@ -2225,7 +2225,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) } } - VARRAY_TREE_INIT (worklist, 64, "work list"); + worklist = VEC_alloc (tree, heap, 64); /* 1. Init worklist. */ @@ -2253,10 +2253,9 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) /* 2. Process_worklist */ - while (VARRAY_ACTIVE_SIZE (worklist) > 0) + while (VEC_length (tree, worklist) > 0) { - stmt = VARRAY_TOP_TREE (worklist); - VARRAY_POP (worklist); + stmt = VEC_pop (tree, worklist); if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) { @@ -2281,7 +2280,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, LOOP_LOC (loop_vinfo))) fprintf (vect_dump, "not vectorized: unsupported use in stmt."); - varray_clear (worklist); + VEC_free (tree, heap, worklist); return false; } if (!def_stmt) @@ -2318,7 +2317,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, LOOP_LOC (loop_vinfo))) fprintf (vect_dump, "not vectorized: unsupported use in stmt."); - varray_clear (worklist); + VEC_free (tree, heap, worklist); return false; } @@ -2338,7 +2337,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) } } /* while worklist */ - varray_clear (worklist); + VEC_free (tree, heap, worklist); return true; } |