OSDN Git Service

* config/sh/sh.c (calc_live_regs): Use
[pf3gnuchains/gcc-fork.git] / gcc / tree-data-ref.h
index ddff36a..2ae5826 100644 (file)
@@ -6,7 +6,7 @@ This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -15,13 +15,13 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #ifndef GCC_TREE_DATA_REF_H
 #define GCC_TREE_DATA_REF_H
 
+#include "graphds.h"
 #include "lambda.h"
 #include "omega.h"
 
@@ -251,6 +251,9 @@ struct data_dependence_relation
 
   /* The classic distance vector.  */
   VEC (lambda_vector, heap) *dist_vects;
+
+  /* Is the dependence reversed with respect to the lexicographic order?  */
+  bool reversed_p;
 };
 
 typedef struct data_dependence_relation *ddr_p;
@@ -281,6 +284,7 @@ DEF_VEC_ALLOC_P(ddr_p,heap);
   VEC_index (lambda_vector, DDR_DIR_VECTS (DDR), I)
 #define DDR_DIST_VECT(DDR, I) \
   VEC_index (lambda_vector, DDR_DIST_VECTS (DDR), I)
+#define DDR_REVERSED_P(DDR) DDR->reversed_p
 
 \f
 
@@ -325,6 +329,46 @@ bool find_loop_nest (struct loop *, VEC (loop_p, heap) **);
 void compute_all_dependences (VEC (data_reference_p, heap) *,
                              VEC (ddr_p, heap) **, VEC (loop_p, heap) *, bool);
 
+\f
+
+/* A RDG vertex representing a statement.  */
+typedef struct rdg_vertex
+{
+  /* The statement represented by this vertex.  */
+  tree stmt;
+} *rdg_vertex_p;
+
+#define RDGV_STMT(V)       ((struct rdg_vertex *) ((V)->data))->stmt
+
+/* Data dependence type.  */
+
+enum rdg_dep_type 
+{
+  /* Read After Write (RAW).  */
+  flow_dd = 'f',
+  
+  /* Write After Read (WAR).  */
+  anti_dd = 'a',
+  
+  /* Write After Write (WAW).  */
+  output_dd = 'o', 
+  
+  /* Read After Read (RAR).  */
+  input_dd = 'i' 
+};
+
+/* Dependence information attached to an edge of the RDG.  */
+
+typedef struct rdg_edge 
+{
+  /* Type of the dependence.  */
+  enum rdg_dep_type type;
+} *rdg_edge_p;
+
+#define RDGE_TYPE(E)        ((struct rdg_edge *) ((E)->data))->type
+
+struct graph *build_rdg (struct loop *);
+
 /* Return the index of the variable VAR in the LOOP_NEST array.  */
 
 static inline int
@@ -344,4 +388,7 @@ index_in_loop_nest (int var, VEC (loop_p, heap) *loop_nest)
 /* In lambda-code.c  */
 bool lambda_transform_legal_p (lambda_trans_matrix, int, VEC (ddr_p, heap) *);
 
+/* In tree-data-refs.c  */
+void split_constant_offset (tree , tree *, tree *);
+
 #endif  /* GCC_TREE_DATA_REF_H  */