diff options
author | Ira Rosen <irar@il.ibm.com> | 2007-09-09 11:22:24 +0000 |
---|---|---|
committer | Ira Rosen <irar@gcc.gnu.org> | 2007-09-09 11:22:24 +0000 |
commit | 89675e73495690215be5a19c0cf9ea3dc83826b1 (patch) | |
tree | 9418d7d2c8a15772cdcdf5fbb870cefdb5a643dc /gcc/tree-vectorizer.h | |
parent | 23a651fcb5a4e57299951b6894779807d2deb693 (diff) | |
download | gcc-89675e73495690215be5a19c0cf9ea3dc83826b1.tar.gz |
tree-vectorizer.h (stmt_vinfo_set_inside_of_loop_cost, [...]): New functions.
* tree-vectorizer.h (stmt_vinfo_set_inside_of_loop_cost,
stmt_vinfo_set_outside_of_loop_cost): New functions.
* tree-vect-transform.c (vect_get_cost_fields): Remove.
(vect_model_simple_cost): Call
stmt_vinfo_set_inside/outside_of_loop_cost to set the relevant cost
field instead of calling vect_get_cost_fields.
(vect_model_store_cost, vect_model_load_cost): Likewise.
From-SVN: r128294
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 0168c2397bb..913c524137b 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -561,6 +561,27 @@ is_loop_header_bb_p (basic_block bb) return false; } +static inline void +stmt_vinfo_set_inside_of_loop_cost (stmt_vec_info stmt_info, slp_tree slp_node, + int cost) +{ + if (slp_node) + SLP_TREE_INSIDE_OF_LOOP_COST (slp_node) = cost; + else + STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) = cost; +} + +static inline void +stmt_vinfo_set_outside_of_loop_cost (stmt_vec_info stmt_info, slp_tree slp_node, + int cost) +{ + if (slp_node) + SLP_TREE_OUTSIDE_OF_LOOP_COST (slp_node) = cost; + else + STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info) = cost; +} + + /*-----------------------------------------------------------------*/ /* Info on data references alignment. */ /*-----------------------------------------------------------------*/ |