diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2009-11-25 05:21:54 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2009-11-25 05:21:54 +0000 |
commit | 0d5ef2a985e7670c22a0cf02d6156c75de2f641c (patch) | |
tree | b5b386501ac3b896a5c96de3696e0af3396627b8 | |
parent | f70de156ee79126bdb86837e6a2e41930c531836 (diff) | |
download | gcc-0d5ef2a985e7670c22a0cf02d6156c75de2f641c.zip gcc-0d5ef2a985e7670c22a0cf02d6156c75de2f641c.tar.gz gcc-0d5ef2a985e7670c22a0cf02d6156c75de2f641c.tar.bz2 |
graphite-sese-to-poly.c (dump_alias_graphs): New.
2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (dump_alias_graphs): New.
(build_scop_drs): Call dump_alias_graphs.
From-SVN: r154619
-rw-r--r-- | gcc/ChangeLog.graphite | 5 | ||||
-rw-r--r-- | gcc/graphite-sese-to-poly.c | 69 |
2 files changed, 43 insertions, 31 deletions
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 4f077da..780d916e 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,5 +1,10 @@ 2009-10-22 Sebastian Pop <sebastian.pop@amd.com> + * graphite-sese-to-poly.c (dump_alias_graphs): New. + (build_scop_drs): Call dump_alias_graphs. + +2009-10-22 Sebastian Pop <sebastian.pop@amd.com> + * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE, SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE. (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE, diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index aa3eaee..de5bcbc 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -2025,6 +2025,42 @@ build_pbb_drs (poly_bb_p pbb) build_poly_dr (dr, pbb); } +/* Dump to file the alias graphs for the data references in DRS. */ + +static void +dump_alias_graphs (VEC (data_reference_p, heap) *drs) +{ + char comment[100]; + FILE *file_dimacs, *file_ecc, *file_dot; + + file_dimacs = fopen ("/tmp/dr_alias_graph_dimacs", "ab"); + if (file_dimacs) + { + snprintf (comment, sizeof (comment), "%s %s", main_input_filename, + current_function_name ()); + write_alias_graph_to_ascii_dimacs (file_dimacs, comment, drs); + fclose (file_dimacs); + } + + file_ecc = fopen ("/tmp/dr_alias_graph_ecc", "ab"); + if (file_ecc) + { + snprintf (comment, sizeof (comment), "%s %s", main_input_filename, + current_function_name ()); + write_alias_graph_to_ascii_ecc (file_ecc, comment, drs); + fclose (file_ecc); + } + + file_dot = fopen ("/tmp/dr_alias_graph_dot", "ab"); + if (file_dot) + { + snprintf (comment, sizeof (comment), "%s %s", main_input_filename, + current_function_name ()); + write_alias_graph_to_ascii_dot (file_dot, comment, drs); + fclose (file_dot); + } +} + /* Build data references in SCOP. */ static void @@ -2053,37 +2089,8 @@ build_scop_drs (scop_p scop) /* When debugging, enable the following code. This cannot be used in production compilers. */ -#if 0 - { - char comment[100]; - FILE *file_dimacs, *file_ecc, *file_dot; - - file_dimacs = fopen ("/tmp/dr_alias_graph_dimacs", "ab"); - file_ecc = fopen ("/tmp/dr_alias_graph_ecc", "ab"); - file_dot = fopen ("/tmp/dr_alias_graph_dot", "ab"); - if (file_dimacs) - { - snprintf (comment, sizeof (comment), "%s %s", main_input_filename, - current_function_name ()); - write_alias_graph_to_ascii_dimacs (file_dimacs, comment, drs); - fclose (file_dimacs); - } - if (file_ecc) - { - snprintf (comment, sizeof (comment), "%s %s", main_input_filename, - current_function_name ()); - write_alias_graph_to_ascii_ecc (file_ecc, comment, drs); - fclose (file_ecc); - } - if (file_dot) - { - snprintf (comment, sizeof (comment), "%s %s", main_input_filename, - current_function_name ()); - write_alias_graph_to_ascii_dot (file_dot, comment, drs); - fclose (file_dot); - } - } -#endif + if (0) + dump_alias_graphs (drs); VEC_free (data_reference_p, heap, drs); |