diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-08-14 14:33:54 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-08-14 14:33:54 +0000 |
commit | 5321ffedee1b4e05b7fa56cab64c595516fd9533 (patch) | |
tree | ffda4ecce65bb72e54a07d8ed2c09288fa207b43 /gcc/tree-vectorizer.c | |
parent | b31856d3ac23cf3dab1e95cb96230dc81564c84a (diff) | |
download | gcc-hsa.tar.gz |
Merged trunk revision 251080 into the hsa branchhsa
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/hsa@251093 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r-- | gcc/tree-vectorizer.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 33a1f580474..feddfa2287c 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -76,6 +76,8 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-propagate.h" #include "dbgcnt.h" #include "tree-scalar-evolution.h" +#include "stringpool.h" +#include "attribs.h" /* Loop or bb location. */ @@ -354,22 +356,36 @@ shrink_simd_arrays delete simd_array_to_simduid_htab; } -/* A helper function to free data refs. */ +/* Initialize the vec_info with kind KIND_IN and target cost data + TARGET_COST_DATA_IN. */ + +vec_info::vec_info (vec_info::vec_kind kind_in, void *target_cost_data_in) + : kind (kind_in), + datarefs (vNULL), + ddrs (vNULL), + target_cost_data (target_cost_data_in) +{ +} -void -vect_destroy_datarefs (vec_info *vinfo) +vec_info::~vec_info () { + slp_instance instance; struct data_reference *dr; unsigned int i; - FOR_EACH_VEC_ELT (vinfo->datarefs, i, dr) + FOR_EACH_VEC_ELT (datarefs, i, dr) if (dr->aux) { free (dr->aux); dr->aux = NULL; } - free_data_refs (vinfo->datarefs); + FOR_EACH_VEC_ELT (slp_instances, i, instance) + vect_free_slp_instance (instance); + + free_data_refs (datarefs); + free_dependence_relations (ddrs); + destroy_cost_data (target_cost_data); } /* A helper function to free scev and LOOP niter information, as well as @@ -830,7 +846,7 @@ vectorize_loops (void) has_mask_store = false; if (loop_vinfo) has_mask_store = LOOP_VINFO_HAS_MASK_STORE (loop_vinfo); - destroy_loop_vec_info (loop_vinfo, true); + delete loop_vinfo; if (has_mask_store) optimize_mask_stores (loop); loop->aux = NULL; |