summaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-03 16:38:29 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-03 16:38:29 +0000
commit984cebc11eb2b6e7d8d8c0b8007f0c009f8bf385 (patch)
treef6e063dce521057ebd890a5ae1826e2f406e0eb3 /gcc/tree-data-ref.c
parentc44e251950af1a1b3714183ada521ba6560eb9f2 (diff)
downloadgcc-984cebc11eb2b6e7d8d8c0b8007f0c009f8bf385.tar.gz
2013-01-03 Richard Biener <rguenther@suse.de>
* tree-data-ref.c (dump_conflict_function): Use less vertical spacing. (dump_subscript): Adjust. (finalize_ddr_dependent): Do not dump redundant info. (analyze_siv_subscript): Adjust. (subscript_dependence_tester): Likewise. (compute_affine_dependence): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194858 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c55
1 files changed, 19 insertions, 36 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 7e95ad710b5..75957d06d98 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -216,16 +216,18 @@ dump_conflict_function (FILE *outf, conflict_function *cf)
unsigned i;
if (cf->n == NO_DEPENDENCE)
- fprintf (outf, "no dependence\n");
+ fprintf (outf, "no dependence");
else if (cf->n == NOT_KNOWN)
- fprintf (outf, "not known\n");
+ fprintf (outf, "not known");
else
{
for (i = 0; i < cf->n; i++)
{
+ if (i != 0)
+ fprintf (outf, " ");
fprintf (outf, "[");
dump_affine_function (outf, cf->fns[i]);
- fprintf (outf, "]\n");
+ fprintf (outf, "]");
}
}
}
@@ -243,24 +245,23 @@ dump_subscript (FILE *outf, struct subscript *subscript)
if (CF_NONTRIVIAL_P (cf))
{
tree last_iteration = SUB_LAST_CONFLICT (subscript);
- fprintf (outf, " last_conflict: ");
- print_generic_stmt (outf, last_iteration, 0);
+ fprintf (outf, "\n last_conflict: ");
+ print_generic_expr (outf, last_iteration, 0);
}
cf = SUB_CONFLICTS_IN_B (subscript);
- fprintf (outf, " iterations_that_access_an_element_twice_in_B: ");
+ fprintf (outf, "\n iterations_that_access_an_element_twice_in_B: ");
dump_conflict_function (outf, cf);
if (CF_NONTRIVIAL_P (cf))
{
tree last_iteration = SUB_LAST_CONFLICT (subscript);
- fprintf (outf, " last_conflict: ");
- print_generic_stmt (outf, last_iteration, 0);
+ fprintf (outf, "\n last_conflict: ");
+ print_generic_expr (outf, last_iteration, 0);
}
- fprintf (outf, " (Subscript distance: ");
- print_generic_stmt (outf, SUB_DISTANCE (subscript), 0);
- fprintf (outf, " )\n");
- fprintf (outf, " )\n");
+ fprintf (outf, "\n (Subscript distance: ");
+ print_generic_expr (outf, SUB_DISTANCE (subscript), 0);
+ fprintf (outf, " ))\n");
}
/* Print the classic direction vector DIRV to OUTF. */
@@ -1507,13 +1508,6 @@ static inline void
finalize_ddr_dependent (struct data_dependence_relation *ddr,
tree chrec)
{
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fprintf (dump_file, "(dependence classified: ");
- print_generic_expr (dump_file, chrec, 0);
- fprintf (dump_file, ")\n");
- }
-
DDR_ARE_DEPENDENT (ddr) = chrec;
free_subscripts (DDR_SUBSCRIPTS (ddr));
DDR_SUBSCRIPTS (ddr).create (0);
@@ -2647,8 +2641,7 @@ end_analyze_subs_aa:
dump_conflict_function (dump_file, *overlaps_a);
fprintf (dump_file, ")\n (overlaps_b = ");
dump_conflict_function (dump_file, *overlaps_b);
- fprintf (dump_file, ")\n");
- fprintf (dump_file, ")\n");
+ fprintf (dump_file, "))\n");
}
}
@@ -2769,7 +2762,7 @@ analyze_siv_subscript (tree chrec_a,
{
siv_subscript_dontknow:;
if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, "siv test failed: unimplemented.\n");
+ fprintf (dump_file, " siv test failed: unimplemented");
*overlaps_a = conflict_fn_not_known ();
*overlaps_b = conflict_fn_not_known ();
*last_conflicts = chrec_dont_know;
@@ -2994,8 +2987,7 @@ analyze_overlapping_iterations (tree chrec_a,
dump_conflict_function (dump_file, *overlap_iterations_a);
fprintf (dump_file, ")\n (overlap_iterations_b = ");
dump_conflict_function (dump_file, *overlap_iterations_b);
- fprintf (dump_file, ")\n");
- fprintf (dump_file, ")\n");
+ fprintf (dump_file, "))\n");
}
}
@@ -3554,19 +3546,12 @@ static void
subscript_dependence_tester (struct data_dependence_relation *ddr,
struct loop *loop_nest)
{
-
- if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, "(subscript_dependence_tester \n");
-
if (subscript_dependence_tester_1 (ddr, DDR_A (ddr), DDR_B (ddr), loop_nest))
dependence_stats.num_dependence_dependent++;
compute_subscript_distance (ddr);
if (build_classic_dist_vector (ddr, loop_nest))
build_classic_dir_vector (ddr);
-
- if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, ")\n");
}
/* Returns true when all the access functions of A are affine or
@@ -4146,11 +4131,11 @@ compute_affine_dependence (struct data_dependence_relation *ddr,
if (access_functions_are_affine_or_constant_p (dra, loop_nest)
&& access_functions_are_affine_or_constant_p (drb, loop_nest))
{
+ subscript_dependence_tester (ddr, loop_nest);
+
if (flag_check_data_deps)
{
- /* Compute the dependences using the first algorithm. */
- subscript_dependence_tester (ddr, loop_nest);
-
+ /* Dump the dependences from the first algorithm. */
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "\n\nBanerjee Analyzer\n");
@@ -4186,8 +4171,6 @@ compute_affine_dependence (struct data_dependence_relation *ddr,
dir_vects));
}
}
- else
- subscript_dependence_tester (ddr, loop_nest);
}
/* As a last case, if the dependence cannot be determined, or if