diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-25 02:33:12 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-25 02:33:12 +0000 |
commit | 6311aa74ebdbc9b7e3ac1751a8754e6a4da85f83 (patch) | |
tree | 0ba3673ca9dc521954986763e3a21121fa40893d /gcc/tree-vect-analyze.c | |
parent | 12fc733d69c4182aaf19bf36b76ef97e0b688e51 (diff) | |
download | gcc-6311aa74ebdbc9b7e3ac1751a8754e6a4da85f83.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r-- | gcc/tree-vect-analyze.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c index 46d76731f44..71f7663357e 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; } |