+2012-03-30 Richard Guenther <rguenther@suse.de>
+
+ * tree-affine.h (print_aff): Remove.
+ * tree-affine.c (print_aff): Make static.
+ * tree-data-ref.h (access_matrix_get_index_for_parameter): Remove.
+ (get_references_in_stmt): Likewise.
+ (print_direction_vector): Likewise.
+ (print_dir_vectors): Likewise.
+ (print_dist_vectors): Likewise.
+ (dump_subscript): Likewise.
+ (dump_ddrs): Likewise.
+ (dump_dist_dir_vectors): Likewise.
+ (dump_data_references): Likewise.
+ (dump_data_dependence_relation): Likewise.
+ (dump_data_dependence_direction): Likewise.
+ (dump_rdg_vertex): Likewise.
+ (dump_rdg_component): Likewise.
+ (debug_ddrs): Declare.
+ (struct data_ref_loc_d): Move ...
+ * tree-data-ref.c (struct data_ref_loc_d): ... here.
+ (get_references_in_stmt): Make static.
+ (dump_data_references): Likewise.
+ (dump_subscript): Likewise.
+ (print_direction_vector): Likewise.
+ (print_dir_vectors): Likewise.
+ (print_dist_vectors): Likewise.
+ (dump_data_dependence_relation): Likewise.
+ (dump_dist_dir_vectors): Likewise.
+ (dump_ddrs): Likewise.
+ (dump_rdg_vertex): Likewise.
+ (dump_rdg_component): Likewise.
+ (debug_ddrs): New function.
+ (access_matrix_get_index_for_parameter): Remove.
+
2012-03-30 Tristan Gingold <gingold@adacore.com>
* config/vms/vms.c (VMS_CRTL_FLOAT32): Rename.
/* Dump into FILE all the data references from DATAREFS. */
-void
+static void
dump_data_references (FILE *file, VEC (data_reference_p, heap) *datarefs)
{
unsigned int i;
dump_data_references (stderr, datarefs);
}
-/* Dump to STDERR all the dependence relations from DDRS. */
-
-DEBUG_FUNCTION void
-debug_data_dependence_relations (VEC (ddr_p, heap) *ddrs)
-{
- dump_data_dependence_relations (stderr, ddrs);
-}
-
-/* Dump into FILE all the dependence relations from DDRS. */
-
-void
-dump_data_dependence_relations (FILE *file,
- VEC (ddr_p, heap) *ddrs)
-{
- unsigned int i;
- struct data_dependence_relation *ddr;
-
- FOR_EACH_VEC_ELT (ddr_p, ddrs, i, ddr)
- dump_data_dependence_relation (file, ddr);
-}
-
/* Print to STDERR the data_reference DR. */
DEBUG_FUNCTION void
/* Dump function for a SUBSCRIPT structure. */
-void
+static void
dump_subscript (FILE *outf, struct subscript *subscript)
{
conflict_function *cf = SUB_CONFLICTS_IN_A (subscript);
/* Print the classic direction vector DIRV to OUTF. */
-void
+static void
print_direction_vector (FILE *outf,
lambda_vector dirv,
int length)
/* Print a vector of direction vectors. */
-void
+static void
print_dir_vectors (FILE *outf, VEC (lambda_vector, heap) *dir_vects,
int length)
{
/* Print a vector of distance vectors. */
-void
-print_dist_vectors (FILE *outf, VEC (lambda_vector, heap) *dist_vects,
- int length)
+static void
+print_dist_vectors (FILE *outf, VEC (lambda_vector, heap) *dist_vects,
+ int length)
{
unsigned j;
lambda_vector v;
print_lambda_vector (outf, v, length);
}
-/* Debug version. */
-
-DEBUG_FUNCTION void
-debug_data_dependence_relation (struct data_dependence_relation *ddr)
-{
- dump_data_dependence_relation (stderr, ddr);
-}
-
/* Dump function for a DATA_DEPENDENCE_RELATION structure. */
-void
+static void
dump_data_dependence_relation (FILE *outf,
struct data_dependence_relation *ddr)
{
fprintf (outf, ")\n");
}
-/* Dump function for a DATA_DEPENDENCE_DIRECTION structure. */
+/* Debug version. */
-void
-dump_data_dependence_direction (FILE *file,
- enum data_dependence_direction dir)
+DEBUG_FUNCTION void
+debug_data_dependence_relation (struct data_dependence_relation *ddr)
{
- switch (dir)
- {
- case dir_positive:
- fprintf (file, "+");
- break;
-
- case dir_negative:
- fprintf (file, "-");
- break;
-
- case dir_equal:
- fprintf (file, "=");
- break;
+ dump_data_dependence_relation (stderr, ddr);
+}
- case dir_positive_or_negative:
- fprintf (file, "+-");
- break;
+/* Dump into FILE all the dependence relations from DDRS. */
- case dir_positive_or_equal:
- fprintf (file, "+=");
- break;
+void
+dump_data_dependence_relations (FILE *file,
+ VEC (ddr_p, heap) *ddrs)
+{
+ unsigned int i;
+ struct data_dependence_relation *ddr;
- case dir_negative_or_equal:
- fprintf (file, "-=");
- break;
+ FOR_EACH_VEC_ELT (ddr_p, ddrs, i, ddr)
+ dump_data_dependence_relation (file, ddr);
+}
- case dir_star:
- fprintf (file, "*");
- break;
+/* Dump to STDERR all the dependence relations from DDRS. */
- default:
- break;
- }
+DEBUG_FUNCTION void
+debug_data_dependence_relations (VEC (ddr_p, heap) *ddrs)
+{
+ dump_data_dependence_relations (stderr, ddrs);
}
/* Dumps the distance and direction vectors in FILE. DDRS contains
dependence vectors, or in other words the number of loops in the
considered nest. */
-void
+static void
dump_dist_dir_vectors (FILE *file, VEC (ddr_p, heap) *ddrs)
{
unsigned int i, j;
/* Dumps the data dependence relations DDRS in FILE. */
-void
+static void
dump_ddrs (FILE *file, VEC (ddr_p, heap) *ddrs)
{
unsigned int i;
fprintf (file, "\n\n");
}
+DEBUG_FUNCTION void
+debug_ddrs (VEC (ddr_p, heap) *ddrs)
+{
+ dump_ddrs (stderr, ddrs);
+}
+
/* Helper function for split_constant_offset. Expresses OP0 CODE OP1
(the type of the result is TYPE) as VAR + OFF, where OFF is a nonzero
constant of type ssizetype, and returns true. If we cannot do this
return true;
}
+/* Describes a location of a memory reference. */
+
+typedef struct data_ref_loc_d
+{
+ /* Position of the memory reference. */
+ tree *pos;
+
+ /* True if the memory reference is read. */
+ bool is_read;
+} data_ref_loc;
+
+DEF_VEC_O (data_ref_loc);
+DEF_VEC_ALLOC_O (data_ref_loc, heap);
+
/* Stores the locations of memory references in STMT to REFERENCES. Returns
true if STMT clobbers memory, false otherwise. */
-bool
+static bool
get_references_in_stmt (gimple stmt, VEC (data_ref_loc, heap) **references)
{
bool clobbers_memory = false;
/* Dump vertex I in RDG to FILE. */
-void
+static void
dump_rdg_vertex (FILE *file, struct graph *rdg, int i)
{
struct vertex *v = &(rdg->vertices[i]);
/* Dump component C of RDG to FILE. If DUMPED is non-null, set the
dumped vertices to that bitmap. */
-void dump_rdg_component (FILE *file, struct graph *rdg, int c, bitmap dumped)
+static void
+dump_rdg_component (FILE *file, struct graph *rdg, int c, bitmap dumped)
{
int i;
htab_delete (seen);
}
-/* Returns the index of PARAMETER in the parameters vector of the
- ACCESS_MATRIX. If PARAMETER does not exist return -1. */
-
-int
-access_matrix_get_index_for_parameter (tree parameter,
- struct access_matrix *access_matrix)
-{
- int i;
- VEC (tree,heap) *lambda_parameters = AM_PARAMETERS (access_matrix);
- tree lambda_parameter;
-
- FOR_EACH_VEC_ELT (tree, lambda_parameters, i, lambda_parameter)
- if (lambda_parameter == parameter)
- return i + AM_NB_INDUCTION_VARS (access_matrix);
-
- return -1;
-}
gcc_unreachable();
}
-int access_matrix_get_index_for_parameter (tree, struct access_matrix *);
-
struct data_reference
{
/* A pointer to the statement that contains this DR. */
#define DDR_REVERSED_P(DDR) DDR->reversed_p
\f
-
-/* Describes a location of a memory reference. */
-
-typedef struct data_ref_loc_d
-{
- /* Position of the memory reference. */
- tree *pos;
-
- /* True if the memory reference is read. */
- bool is_read;
-} data_ref_loc;
-
-DEF_VEC_O (data_ref_loc);
-DEF_VEC_ALLOC_O (data_ref_loc, heap);
-
-bool get_references_in_stmt (gimple, VEC (data_ref_loc, heap) **);
bool dr_analyze_innermost (struct data_reference *, struct loop *);
extern bool compute_data_dependences_for_loop (struct loop *, bool,
VEC (loop_p, heap) **,
extern bool compute_data_dependences_for_bb (basic_block, bool,
VEC (data_reference_p, heap) **,
VEC (ddr_p, heap) **);
-extern void print_direction_vector (FILE *, lambda_vector, int);
-extern void print_dir_vectors (FILE *, VEC (lambda_vector, heap) *, int);
-extern void print_dist_vectors (FILE *, VEC (lambda_vector, heap) *, int);
-extern void dump_subscript (FILE *, struct subscript *);
-extern void dump_ddrs (FILE *, VEC (ddr_p, heap) *);
-extern void dump_dist_dir_vectors (FILE *, VEC (ddr_p, heap) *);
+extern void debug_ddrs (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 dump_data_dependence_relations (FILE *, VEC (ddr_p, heap) *);
extern void debug_data_dependence_relations (VEC (ddr_p, heap) *);
-extern void dump_data_dependence_direction (FILE *,
- enum data_dependence_direction);
extern void free_dependence_relation (struct data_dependence_relation *);
extern void free_dependence_relations (VEC (ddr_p, heap) *);
extern void free_data_ref (data_reference_p);
#define RDG_MEM_WRITE_STMT(RDG, I) RDGV_HAS_MEM_WRITE (&(RDG->vertices[I]))
#define RDG_MEM_READS_STMT(RDG, I) RDGV_HAS_MEM_READS (&(RDG->vertices[I]))
-void dump_rdg_vertex (FILE *, struct graph *, int);
void debug_rdg_vertex (struct graph *, int);
-void dump_rdg_component (FILE *, struct graph *, int, bitmap);
void debug_rdg_component (struct graph *, int);
void dump_rdg (FILE *, struct graph *);
void debug_rdg (struct graph *);