Commit aeb83f09 by Richard Guenther Committed by Richard Biener

tree-affine.h (print_aff): Remove.

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.

From-SVN: r185994
parent b9268e55
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> 2012-03-30 Tristan Gingold <gingold@adacore.com>
* config/vms/vms.c (VMS_CRTL_FLOAT32): Rename. * config/vms/vms.c (VMS_CRTL_FLOAT32): Rename.
......
...@@ -812,7 +812,7 @@ aff_combination_constant_multiple_p (aff_tree *val, aff_tree *div, ...@@ -812,7 +812,7 @@ aff_combination_constant_multiple_p (aff_tree *val, aff_tree *div,
/* Prints the affine VAL to the FILE. */ /* Prints the affine VAL to the FILE. */
void static void
print_aff (FILE *file, aff_tree *val) print_aff (FILE *file, aff_tree *val)
{ {
unsigned i; unsigned i;
......
...@@ -79,5 +79,4 @@ void free_affine_expand_cache (struct pointer_map_t **); ...@@ -79,5 +79,4 @@ void free_affine_expand_cache (struct pointer_map_t **);
bool aff_comb_cannot_overlap_p (aff_tree *, double_int, double_int); bool aff_comb_cannot_overlap_p (aff_tree *, double_int, double_int);
/* Debugging functions. */ /* Debugging functions. */
void print_aff (FILE *, aff_tree *);
void debug_aff (aff_tree *); void debug_aff (aff_tree *);
...@@ -140,7 +140,7 @@ int_divides_p (int a, int b) ...@@ -140,7 +140,7 @@ int_divides_p (int a, int b)
/* Dump into FILE all the data references from DATAREFS. */ /* Dump into FILE all the data references from DATAREFS. */
void static void
dump_data_references (FILE *file, VEC (data_reference_p, heap) *datarefs) dump_data_references (FILE *file, VEC (data_reference_p, heap) *datarefs)
{ {
unsigned int i; unsigned int i;
...@@ -158,27 +158,6 @@ debug_data_references (VEC (data_reference_p, heap) *datarefs) ...@@ -158,27 +158,6 @@ debug_data_references (VEC (data_reference_p, heap) *datarefs)
dump_data_references (stderr, datarefs); 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. */ /* Print to STDERR the data_reference DR. */
DEBUG_FUNCTION void DEBUG_FUNCTION void
...@@ -253,7 +232,7 @@ dump_conflict_function (FILE *outf, conflict_function *cf) ...@@ -253,7 +232,7 @@ dump_conflict_function (FILE *outf, conflict_function *cf)
/* Dump function for a SUBSCRIPT structure. */ /* Dump function for a SUBSCRIPT structure. */
void static void
dump_subscript (FILE *outf, struct subscript *subscript) dump_subscript (FILE *outf, struct subscript *subscript)
{ {
conflict_function *cf = SUB_CONFLICTS_IN_A (subscript); conflict_function *cf = SUB_CONFLICTS_IN_A (subscript);
...@@ -286,7 +265,7 @@ dump_subscript (FILE *outf, struct subscript *subscript) ...@@ -286,7 +265,7 @@ dump_subscript (FILE *outf, struct subscript *subscript)
/* Print the classic direction vector DIRV to OUTF. */ /* Print the classic direction vector DIRV to OUTF. */
void static void
print_direction_vector (FILE *outf, print_direction_vector (FILE *outf,
lambda_vector dirv, lambda_vector dirv,
int length) int length)
...@@ -331,7 +310,7 @@ print_direction_vector (FILE *outf, ...@@ -331,7 +310,7 @@ print_direction_vector (FILE *outf,
/* Print a vector of direction vectors. */ /* Print a vector of direction vectors. */
void static void
print_dir_vectors (FILE *outf, VEC (lambda_vector, heap) *dir_vects, print_dir_vectors (FILE *outf, VEC (lambda_vector, heap) *dir_vects,
int length) int length)
{ {
...@@ -356,9 +335,9 @@ print_lambda_vector (FILE * outfile, lambda_vector vector, int n) ...@@ -356,9 +335,9 @@ print_lambda_vector (FILE * outfile, lambda_vector vector, int n)
/* Print a vector of distance vectors. */ /* Print a vector of distance vectors. */
void static void
print_dist_vectors (FILE *outf, VEC (lambda_vector, heap) *dist_vects, print_dist_vectors (FILE *outf, VEC (lambda_vector, heap) *dist_vects,
int length) int length)
{ {
unsigned j; unsigned j;
lambda_vector v; lambda_vector v;
...@@ -367,17 +346,9 @@ print_dist_vectors (FILE *outf, VEC (lambda_vector, heap) *dist_vects, ...@@ -367,17 +346,9 @@ print_dist_vectors (FILE *outf, VEC (lambda_vector, heap) *dist_vects,
print_lambda_vector (outf, v, length); 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. */ /* Dump function for a DATA_DEPENDENCE_RELATION structure. */
void static void
dump_data_dependence_relation (FILE *outf, dump_data_dependence_relation (FILE *outf,
struct data_dependence_relation *ddr) struct data_dependence_relation *ddr)
{ {
...@@ -450,45 +421,33 @@ dump_data_dependence_relation (FILE *outf, ...@@ -450,45 +421,33 @@ dump_data_dependence_relation (FILE *outf,
fprintf (outf, ")\n"); fprintf (outf, ")\n");
} }
/* Dump function for a DATA_DEPENDENCE_DIRECTION structure. */ /* Debug version. */
void DEBUG_FUNCTION void
dump_data_dependence_direction (FILE *file, debug_data_dependence_relation (struct data_dependence_relation *ddr)
enum data_dependence_direction dir)
{ {
switch (dir) dump_data_dependence_relation (stderr, ddr);
{ }
case dir_positive:
fprintf (file, "+");
break;
case dir_negative:
fprintf (file, "-");
break;
case dir_equal:
fprintf (file, "=");
break;
case dir_positive_or_negative: /* Dump into FILE all the dependence relations from DDRS. */
fprintf (file, "+-");
break;
case dir_positive_or_equal: void
fprintf (file, "+="); dump_data_dependence_relations (FILE *file,
break; VEC (ddr_p, heap) *ddrs)
{
unsigned int i;
struct data_dependence_relation *ddr;
case dir_negative_or_equal: FOR_EACH_VEC_ELT (ddr_p, ddrs, i, ddr)
fprintf (file, "-="); dump_data_dependence_relation (file, ddr);
break; }
case dir_star: /* Dump to STDERR all the dependence relations from DDRS. */
fprintf (file, "*");
break;
default: DEBUG_FUNCTION void
break; 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 /* Dumps the distance and direction vectors in FILE. DDRS contains
...@@ -496,7 +455,7 @@ dump_data_dependence_direction (FILE *file, ...@@ -496,7 +455,7 @@ dump_data_dependence_direction (FILE *file,
dependence vectors, or in other words the number of loops in the dependence vectors, or in other words the number of loops in the
considered nest. */ considered nest. */
void static void
dump_dist_dir_vectors (FILE *file, VEC (ddr_p, heap) *ddrs) dump_dist_dir_vectors (FILE *file, VEC (ddr_p, heap) *ddrs)
{ {
unsigned int i, j; unsigned int i, j;
...@@ -526,7 +485,7 @@ dump_dist_dir_vectors (FILE *file, VEC (ddr_p, heap) *ddrs) ...@@ -526,7 +485,7 @@ dump_dist_dir_vectors (FILE *file, VEC (ddr_p, heap) *ddrs)
/* Dumps the data dependence relations DDRS in FILE. */ /* Dumps the data dependence relations DDRS in FILE. */
void static void
dump_ddrs (FILE *file, VEC (ddr_p, heap) *ddrs) dump_ddrs (FILE *file, VEC (ddr_p, heap) *ddrs)
{ {
unsigned int i; unsigned int i;
...@@ -538,6 +497,12 @@ dump_ddrs (FILE *file, VEC (ddr_p, heap) *ddrs) ...@@ -538,6 +497,12 @@ dump_ddrs (FILE *file, VEC (ddr_p, heap) *ddrs)
fprintf (file, "\n\n"); 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 /* 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 (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 constant of type ssizetype, and returns true. If we cannot do this
...@@ -4236,10 +4201,24 @@ compute_all_dependences (VEC (data_reference_p, heap) *datarefs, ...@@ -4236,10 +4201,24 @@ compute_all_dependences (VEC (data_reference_p, heap) *datarefs,
return true; 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 /* Stores the locations of memory references in STMT to REFERENCES. Returns
true if STMT clobbers memory, false otherwise. */ true if STMT clobbers memory, false otherwise. */
bool static bool
get_references_in_stmt (gimple stmt, VEC (data_ref_loc, heap) **references) get_references_in_stmt (gimple stmt, VEC (data_ref_loc, heap) **references)
{ {
bool clobbers_memory = false; bool clobbers_memory = false;
...@@ -4708,7 +4687,7 @@ free_data_refs (VEC (data_reference_p, heap) *datarefs) ...@@ -4708,7 +4687,7 @@ free_data_refs (VEC (data_reference_p, heap) *datarefs)
/* Dump vertex I in RDG to FILE. */ /* Dump vertex I in RDG to FILE. */
void static void
dump_rdg_vertex (FILE *file, struct graph *rdg, int i) dump_rdg_vertex (FILE *file, struct graph *rdg, int i)
{ {
struct vertex *v = &(rdg->vertices[i]); struct vertex *v = &(rdg->vertices[i]);
...@@ -4744,7 +4723,8 @@ debug_rdg_vertex (struct graph *rdg, int i) ...@@ -4744,7 +4723,8 @@ debug_rdg_vertex (struct graph *rdg, int i)
/* Dump component C of RDG to FILE. If DUMPED is non-null, set the /* Dump component C of RDG to FILE. If DUMPED is non-null, set the
dumped vertices to that bitmap. */ 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; int i;
...@@ -5401,20 +5381,3 @@ remove_similar_memory_refs (VEC (gimple, heap) **stmts) ...@@ -5401,20 +5381,3 @@ remove_similar_memory_refs (VEC (gimple, heap) **stmts)
htab_delete (seen); 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;
}
...@@ -169,8 +169,6 @@ am_vector_index_for_loop (struct access_matrix *access_matrix, int loop_num) ...@@ -169,8 +169,6 @@ am_vector_index_for_loop (struct access_matrix *access_matrix, int loop_num)
gcc_unreachable(); gcc_unreachable();
} }
int access_matrix_get_index_for_parameter (tree, struct access_matrix *);
struct data_reference struct data_reference
{ {
/* A pointer to the statement that contains this DR. */ /* A pointer to the statement that contains this DR. */
...@@ -371,22 +369,6 @@ DEF_VEC_ALLOC_P(ddr_p,heap); ...@@ -371,22 +369,6 @@ DEF_VEC_ALLOC_P(ddr_p,heap);
#define DDR_REVERSED_P(DDR) DDR->reversed_p #define DDR_REVERSED_P(DDR) DDR->reversed_p
/* 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 *); bool dr_analyze_innermost (struct data_reference *, struct loop *);
extern bool compute_data_dependences_for_loop (struct loop *, bool, extern bool compute_data_dependences_for_loop (struct loop *, bool,
VEC (loop_p, heap) **, VEC (loop_p, heap) **,
...@@ -395,23 +377,13 @@ extern bool compute_data_dependences_for_loop (struct loop *, bool, ...@@ -395,23 +377,13 @@ extern bool compute_data_dependences_for_loop (struct loop *, bool,
extern bool compute_data_dependences_for_bb (basic_block, bool, extern bool compute_data_dependences_for_bb (basic_block, bool,
VEC (data_reference_p, heap) **, VEC (data_reference_p, heap) **,
VEC (ddr_p, heap) **); VEC (ddr_p, heap) **);
extern void print_direction_vector (FILE *, lambda_vector, int); extern void debug_ddrs (VEC (ddr_p, heap) *);
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 dump_data_reference (FILE *, struct data_reference *); extern void dump_data_reference (FILE *, struct data_reference *);
extern void debug_data_reference (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_references (VEC (data_reference_p, heap) *);
extern void debug_data_dependence_relation (struct data_dependence_relation *); 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 dump_data_dependence_relations (FILE *, VEC (ddr_p, heap) *);
extern void debug_data_dependence_relations (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_relation (struct data_dependence_relation *);
extern void free_dependence_relations (VEC (ddr_p, heap) *); extern void free_dependence_relations (VEC (ddr_p, heap) *);
extern void free_data_ref (data_reference_p); extern void free_data_ref (data_reference_p);
...@@ -567,9 +539,7 @@ typedef struct rdg_vertex ...@@ -567,9 +539,7 @@ typedef struct rdg_vertex
#define RDG_MEM_WRITE_STMT(RDG, I) RDGV_HAS_MEM_WRITE (&(RDG->vertices[I])) #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])) #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 debug_rdg_vertex (struct graph *, int);
void dump_rdg_component (FILE *, struct graph *, int, bitmap);
void debug_rdg_component (struct graph *, int); void debug_rdg_component (struct graph *, int);
void dump_rdg (FILE *, struct graph *); void dump_rdg (FILE *, struct graph *);
void debug_rdg (struct graph *); void debug_rdg (struct graph *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment