/* Data references and dependences detectors.
- Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
Contributed by Sebastian Pop <pop@cri.ensmp.fr>
This file is part of GCC.
{
/* The alias information that should be used for new pointers to this
location. SYMBOL_TAG is either a DECL or a SYMBOL_MEMORY_TAG. */
- tree symbol_tag;
struct ptr_info_def *ptr_info;
/* The set of virtual operands corresponding to this memory reference,
bitmap vops;
};
-typedef struct scop *scop_p;
-
/* Each vector of the access matrix represents a linear access
function for a subscript. First elements correspond to the
leftmost indices, ie. for a[i][j] the first vector corresponds to
VEC (loop_p, heap) *loop_nest;
int nb_induction_vars;
VEC (tree, heap) *parameters;
- VEC (lambda_vector, heap) *matrix;
+ VEC (lambda_vector, gc) *matrix;
};
#define AM_LOOP_NEST(M) (M)->loop_nest
/* Alias information for the data reference. */
struct dr_alias alias;
- /* The SCoP in which the data reference was analyzed. */
- scop_p scop;
-
/* Matrix representation for the data access functions. */
struct access_matrix *access_matrix;
};
-#define DR_SCOP(DR) (DR)->scop
#define DR_STMT(DR) (DR)->stmt
#define DR_REF(DR) (DR)->ref
#define DR_BASE_OBJECT(DR) (DR)->indices.base_object
#define DR_OFFSET(DR) (DR)->innermost.offset
#define DR_INIT(DR) (DR)->innermost.init
#define DR_STEP(DR) (DR)->innermost.step
-#define DR_SYMBOL_TAG(DR) (DR)->alias.symbol_tag
#define DR_PTR_INFO(DR) (DR)->alias.ptr_info
-#define DR_VOPS(DR) (DR)->alias.vops
#define DR_ALIGNED_TO(DR) (DR)->innermost.aligned_to
#define DR_ACCESS_MATRIX(DR) (DR)->access_matrix
struct data_reference *a;
struct data_reference *b;
- /* When the dependence relation is affine, it can be represented by
- a distance vector. */
- bool affine_p;
-
- /* Set to true when the dependence relation is on the same data
- access. */
- bool self_reference_p;
-
/* A "yes/no/maybe" field for the dependence relation:
- when "ARE_DEPENDENT == NULL_TREE", there exist a dependence
/* The analyzed loop nest. */
VEC (loop_p, heap) *loop_nest;
- /* An index in loop_nest for the innermost loop that varies for
- this data dependence relation. */
- unsigned inner_loop;
-
/* The classic direction vector. */
VEC (lambda_vector, heap) *dir_vects;
/* The classic distance vector. */
VEC (lambda_vector, heap) *dist_vects;
+ /* An index in loop_nest for the innermost loop that varies for
+ this data dependence relation. */
+ unsigned inner_loop;
+
/* Is the dependence reversed with respect to the lexicographic order? */
bool reversed_p;
+
+ /* When the dependence relation is affine, it can be represented by
+ a distance vector. */
+ bool affine_p;
+
+ /* Set to true when the dependence relation is on the same data
+ access. */
+ bool self_reference_p;
};
typedef struct data_dependence_relation *ddr_p;
extern bool compute_data_dependences_for_loop (struct loop *, bool,
VEC (data_reference_p, heap) **,
VEC (ddr_p, heap) **);
+extern bool compute_data_dependences_for_bb (basic_block, bool,
+ VEC (data_reference_p, heap) **,
+ VEC (ddr_p, heap) **);
extern tree find_data_references_in_loop (struct loop *,
VEC (data_reference_p, heap) **);
extern void print_direction_vector (FILE *, lambda_vector, int);
extern void dump_ddrs (FILE *, VEC (ddr_p, heap) *);
extern void dump_dist_dir_vectors (FILE *, VEC (ddr_p, heap) *);
extern void dump_data_reference (FILE *, struct data_reference *);
+extern void debug_data_reference (struct data_reference *);
extern void dump_data_references (FILE *, VEC (data_reference_p, heap) *);
+extern void debug_data_references (VEC (data_reference_p, heap) *);
extern void debug_data_dependence_relation (struct data_dependence_relation *);
extern void dump_data_dependence_relation (FILE *,
struct data_dependence_relation *);
extern void free_data_refs (VEC (data_reference_p, heap) *);
extern bool find_data_references_in_stmt (struct loop *, gimple,
VEC (data_reference_p, heap) **);
+extern bool graphite_find_data_references_in_stmt (struct loop *, gimple,
+ VEC (data_reference_p, heap) **);
struct data_reference *create_data_ref (struct loop *, tree, gimple, bool);
extern bool find_loop_nest (struct loop *, VEC (loop_p, heap) **);
extern void compute_all_dependences (VEC (data_reference_p, heap) *,
extern void create_rdg_vertices (struct graph *, VEC (gimple, heap) *);
extern bool dr_may_alias_p (const struct data_reference *,
const struct data_reference *);
-extern bool stmt_simple_memref_p (struct loop *, gimple, tree);
/* Return true when the DDR contains two data references that have the
same access functions. */