tree-vect-data-refs.c (vect_get_data_access_cost): Get prologue cost vector and pass...
authorRichard Biener <rguenther@suse.de>
Thu, 26 Apr 2018 07:30:55 +0000 (07:30 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 26 Apr 2018 07:30:55 +0000 (07:30 +0000)
2018-04-26  Richard Biener  <rguenther@suse.de>

* tree-vect-data-refs.c (vect_get_data_access_cost): Get
prologue cost vector and pass it to vect_get_load_cost.
(vect_get_peeling_costs_all_drs): Likewise.
(vect_peeling_hash_get_lowest_cost): Likewise.
(vect_enhance_data_refs_alignment): Likewise.

From-SVN: r259668

gcc/ChangeLog
gcc/tree-vect-data-refs.c

index d3834b074f6410870a5455086d12b66173eb341c..61324440b068e79b2acd84cb84654791cbeff91d 100644 (file)
@@ -1,3 +1,11 @@
+2018-04-26  Richard Biener  <rguenther@suse.de>
+
+       * tree-vect-data-refs.c (vect_get_data_access_cost): Get
+       prologue cost vector and pass it to vect_get_load_cost.
+       (vect_get_peeling_costs_all_drs): Likewise.
+       (vect_peeling_hash_get_lowest_cost): Likewise.
+       (vect_enhance_data_refs_alignment): Likewise.
+
 2018-04-26  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/85450
index 9aabcc18ff9d3f4692d891ed1b84b11d8dedd35b..df362b0e1c5cd9ec4709c93ce9848101c0ee07f1 100644 (file)
@@ -1253,7 +1253,8 @@ static void
 vect_get_data_access_cost (struct data_reference *dr,
                            unsigned int *inside_cost,
                            unsigned int *outside_cost,
-                          stmt_vector_for_cost *body_cost_vec)
+                          stmt_vector_for_cost *body_cost_vec,
+                          stmt_vector_for_cost *prologue_cost_vec)
 {
   gimple *stmt = DR_STMT (dr);
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
@@ -1267,7 +1268,7 @@ vect_get_data_access_cost (struct data_reference *dr,
 
   if (DR_IS_READ (dr))
     vect_get_load_cost (dr, ncopies, true, inside_cost, outside_cost,
-                       NULL, body_cost_vec, false);
+                       prologue_cost_vec, body_cost_vec, false);
   else
     vect_get_store_cost (dr, ncopies, inside_cost, body_cost_vec);
 
@@ -1376,6 +1377,7 @@ vect_get_peeling_costs_all_drs (vec<data_reference_p> datarefs,
                                unsigned int *inside_cost,
                                unsigned int *outside_cost,
                                stmt_vector_for_cost *body_cost_vec,
+                               stmt_vector_for_cost *prologue_cost_vec,
                                unsigned int npeel,
                                bool unknown_misalignment)
 {
@@ -1410,7 +1412,7 @@ vect_get_peeling_costs_all_drs (vec<data_reference_p> datarefs,
       else
        vect_update_misalignment_for_peel (dr, dr0, npeel);
       vect_get_data_access_cost (dr, inside_cost, outside_cost,
-                                body_cost_vec);
+                                body_cost_vec, prologue_cost_vec);
       SET_DR_MISALIGNMENT (dr, save_misalignment);
     }
 }
@@ -1437,7 +1439,8 @@ vect_peeling_hash_get_lowest_cost (_vect_peel_info **slot,
 
   vect_get_peeling_costs_all_drs (LOOP_VINFO_DATAREFS (loop_vinfo),
                                  elem->dr, &inside_cost, &outside_cost,
-                                 &body_cost_vec, elem->npeel, false);
+                                 &body_cost_vec, &prologue_cost_vec,
+                                 elem->npeel, false);
 
   body_cost_vec.release ();
 
@@ -1867,7 +1870,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
       vect_get_peeling_costs_all_drs (datarefs, dr0,
                                      &load_inside_cost,
                                      &load_outside_cost,
-                                     &dummy, estimated_npeels, true);
+                                     &dummy, &dummy, estimated_npeels, true);
       dummy.release ();
 
       if (first_store)
@@ -1876,7 +1879,8 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
          vect_get_peeling_costs_all_drs (datarefs, first_store,
                                          &store_inside_cost,
                                          &store_outside_cost,
-                                         &dummy, estimated_npeels, true);
+                                         &dummy, &dummy,
+                                         estimated_npeels, true);
          dummy.release ();
        }
       else
@@ -1965,7 +1969,8 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
       stmt_vector_for_cost dummy;
       dummy.create (2);
       vect_get_peeling_costs_all_drs (datarefs, NULL, &nopeel_inside_cost,
-                                     &nopeel_outside_cost, &dummy, 0, false);
+                                     &nopeel_outside_cost, &dummy, &dummy,
+                                     0, false);
       dummy.release ();
 
       /* Add epilogue costs.  As we do not peel for alignment here, no prologue