From 6311aa74ebdbc9b7e3ac1751a8754e6a4da85f83 Mon Sep 17 00:00:00 2001 From: kazu Date: Mon, 25 Apr 2005 02:33:12 +0000 Subject: [PATCH] * 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 --- gcc/ChangeLog | 7 +++++++ gcc/tree-vect-analyze.c | 23 +++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b13087c329e..72e91c064b1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-04-25 Kazu Hirata + + * 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 * 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 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; } -- 2.11.0