From: Aditya Kumar Date: Sat, 10 Oct 2015 14:53:16 +0000 (+0000) Subject: add dump of data dependences X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea17c0fef46752dbad162c0d9882570876a4ff6c;p=gcc.git add dump of data dependences 2015-10-07 Aditya Kumar Sebastian Pop * graphite-dependences.c (scop_get_dependences): Add dump of the data dependence graph. * graphite-poly.c (print_isl_union_map): New. (debug_isl_union_map): New. * graphite-poly.h (print_isl_union_map): Declare. (debug_isl_union_map): Declare. Co-Authored-By: Sebastian Pop From-SVN: r228677 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f29a94c0144..034798b0f7e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2015-10-10 Aditya Kumar + Sebastian Pop + + * graphite-dependences.c (scop_get_dependences): Add dump of the + data dependence graph. + * graphite-poly.c (print_isl_union_map): New. + (debug_isl_union_map): New. + * graphite-poly.h (print_isl_union_map): Declare. + (debug_isl_union_map): Declare. + 2015-10-10 Aditya Kumar Sebastian Pop diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c index e879429d0b1..aef29acfb3a 100644 --- a/gcc/graphite-dependences.c +++ b/gcc/graphite-dependences.c @@ -355,6 +355,13 @@ scop_get_dependences (scop_p scop) dependences = isl_union_map_union (dependences, isl_union_map_copy (scop->may_waw)); + if (dump_file) + { + fprintf (dump_file, "data dependences (\n"); + print_isl_union_map (dump_file, dependences); + fprintf (dump_file, ")\n"); + } + return dependences; } diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index c3a14c7fdd5..0d1dc63daf6 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -594,6 +594,22 @@ debug_isl_map (isl_map *map) print_isl_map (stderr, map); } +void +print_isl_union_map (FILE *f, isl_union_map *map) +{ + isl_printer *p = isl_printer_to_file (the_isl_ctx, f); + p = isl_printer_print_union_map (p, map); + p = isl_printer_print_str (p, "\n"); + isl_printer_free (p); +} + +DEBUG_FUNCTION void +debug_isl_union_map (isl_union_map *map) +{ + print_isl_union_map (stderr, map); +} + + void print_isl_aff (FILE *f, isl_aff *aff) { diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index 6b97b714c3c..63fdb3bb3ff 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -298,10 +298,12 @@ extern void debug_iteration_domain (poly_bb_p); extern void debug_iteration_domains (scop_p); extern void print_isl_set (FILE *, isl_set *); extern void print_isl_map (FILE *, isl_map *); +extern void print_isl_union_map (FILE *, isl_union_map *); extern void print_isl_aff (FILE *, isl_aff *); extern void print_isl_constraint (FILE *, isl_constraint *); extern void debug_isl_set (isl_set *); extern void debug_isl_map (isl_map *); +extern void debug_isl_union_map (isl_union_map *); extern void debug_isl_aff (isl_aff *); extern void debug_isl_constraint (isl_constraint *); extern int scop_do_interchange (scop_p);