OSDN Git Service

* ChangeLog: Additional fixes for AVX2 ChangeLog entry.
[pf3gnuchains/gcc-fork.git] / gcc / graphite-poly.h
index b9bf1ed..417e99e 100644 (file)
@@ -301,8 +301,7 @@ pdr_may_write_p (poly_dr_p pdr)
 static inline bool
 same_pdr_p (poly_dr_p pdr1, poly_dr_p pdr2)
 {
-  return PDR_TYPE (pdr1) == PDR_TYPE (pdr2)
-    && PDR_NB_SUBSCRIPTS (pdr1) == PDR_NB_SUBSCRIPTS (pdr2)
+  return PDR_NB_SUBSCRIPTS (pdr1) == PDR_NB_SUBSCRIPTS (pdr2)
     && PDR_BASE_OBJECT_SET (pdr1) == PDR_BASE_OBJECT_SET (pdr2);
 }
 
@@ -389,7 +388,7 @@ struct poly_bb
 #define PBB_PDR_DUPLICATES_REMOVED(PBB) (PBB->pdr_duplicates_removed)
 #define PBB_IS_REDUCTION(PBB) (PBB->is_reduction)
 
-extern void new_poly_bb (scop_p, void *, bool);
+extern poly_bb_p new_poly_bb (scop_p, void *);
 extern void free_poly_bb (poly_bb_p);
 extern void debug_loop_vec (poly_bb_p);
 extern void schedule_to_scattering (poly_bb_p, int);
@@ -411,9 +410,10 @@ extern void print_iteration_domain (FILE *, poly_bb_p, int);
 extern void print_iteration_domains (FILE *, scop_p, int);
 extern void debug_iteration_domain (poly_bb_p, int);
 extern void debug_iteration_domains (scop_p, int);
-extern bool scop_do_interchange (scop_p);
-extern bool scop_do_strip_mine (scop_p);
+extern int scop_do_interchange (scop_p);
+extern int scop_do_strip_mine (scop_p, int);
 extern bool scop_do_block (scop_p);
+extern bool flatten_all_loops (scop_p);
 extern void pbb_number_of_iterations_at_time (poly_bb_p, graphite_dim_t, mpz_t);
 extern void pbb_remove_duplicate_pdrs (poly_bb_p);
 
@@ -433,6 +433,22 @@ number_of_write_pdrs (poly_bb_p pbb)
   return res;
 }
 
+/* Returns a gimple_bb from BB.  */
+
+static inline gimple_bb_p
+gbb_from_bb (basic_block bb)
+{
+  return (gimple_bb_p) bb->aux;
+}
+
+/* The poly_bb of the BB.  */
+
+static inline poly_bb_p
+pbb_from_bb (basic_block bb)
+{
+  return GBB_PBB (gbb_from_bb (bb));
+}
+
 /* The basic block of the PBB.  */
 
 static inline basic_block
@@ -944,7 +960,7 @@ find_lst_loop (lst_p stmt, int loop_depth)
   return loop;
 }
 
-/* Return the first lst representing a PBB statement in LST.  */
+/* Return the first LST representing a PBB statement in LST.  */
 
 static inline lst_p
 lst_find_first_pbb (lst_p lst)
@@ -968,7 +984,7 @@ lst_find_first_pbb (lst_p lst)
   return NULL;
 }
 
-/* Returns true when LST is a loop that does not contains
+/* Returns true when LST is a loop that does not contain
    statements.  */
 
 static inline bool
@@ -977,7 +993,7 @@ lst_empty_p (lst_p lst)
   return !lst_find_first_pbb (lst);
 }
 
-/* Return the last lst representing a PBB statement in LST.  */
+/* Return the last LST representing a PBB statement in LST.  */
 
 static inline lst_p
 lst_find_last_pbb (lst_p lst)
@@ -1061,6 +1077,26 @@ lst_remove_from_sequence (lst_p lst)
   LST_LOOP_FATHER (lst) = NULL;
 }
 
+/* Removes the loop LST and inline its body in the father loop.  */
+
+static inline void
+lst_remove_loop_and_inline_stmts_in_loop_father (lst_p lst)
+{
+  lst_p l, father = LST_LOOP_FATHER (lst);
+  int i, dewey = lst_dewey_number (lst);
+
+  gcc_assert (lst && father && dewey >= 0);
+
+  VEC_ordered_remove (lst_p, LST_SEQ (father), dewey);
+  LST_LOOP_FATHER (lst) = NULL;
+
+  FOR_EACH_VEC_ELT (lst_p, LST_SEQ (lst), i, l)
+    {
+      VEC_safe_insert (lst_p, heap, LST_SEQ (father), dewey + i, l);
+      LST_LOOP_FATHER (l) = father;
+    }
+}
+
 /* Sets NITER to the upper bound approximation of the number of
    iterations of loop LST.  */