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
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"
/* 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;
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
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
/* 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 */