diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2008-03-10 12:36:40 +0000 |
---|---|---|
committer | Sebastian Pop <sebastian.pop@amd.com> | 2008-03-10 12:36:40 +0000 |
commit | 293c6e23e3944399b6f90d3426ef29f9350068e6 (patch) | |
tree | bf2f3d7b3f06cb67f826aacecabdd67b6d1cced9 | |
parent | 8b33492a16dd7b8538072128dd858c100f93f46f (diff) |
2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite.c (dot_all_scops): Update formatting.
Bbs can now be part of more than one SCoP.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/graphite@133075 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.graphite | 5 | ||||
-rw-r--r-- | gcc/graphite.c | 49 |
2 files changed, 36 insertions, 18 deletions
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 2390ee44d0f..3ae670da4e8 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,8 @@ +2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de> + + * graphite.c (dot_all_scops): Update formatting. + Bbs can now be part of more than one SCoP. + 2008-03-04 Sebastian Pop <sebastian.pop@amd.com> * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix diff --git a/gcc/graphite.c b/gcc/graphite.c index 28473f2f001..86affd3dd0a 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -253,7 +253,15 @@ dot_all_scops_1 (FILE *file) FOR_ALL_BB (bb) { - /* Select color for scop. */ + + /* Use HTML for every bb label. So we are able to print bbs + which are part of two different SCoPs, with two different + background colors. */ + fprintf (file, "%d [label=<<TABLE BORDER=\"0\" CELLBORDER=\"1\" ", + bb->index); + fprintf (file, "CELLSPACING=\"0\"> "); + + /* Select color for SCoP. */ for (i = 0; VEC_iterate (scop_p, current_scops, i, scop); i++) if (bb_in_scop_p (bb, scop) || scop->exit == bb || scop->entry == bb) { @@ -287,32 +295,37 @@ dot_all_scops_1 (FILE *file) color = "#e41a1c"; } - if (bb == scop->entry) - fprintf (file, "%d [style=\"bold,filled\",fillcolor=\"%s\"];\n", - bb->index, color); - else - fprintf (file, "%d [style=\"bold\",color=\"%s\"];\n", bb->index, - color); + fprintf (file, " <TR><TD WIDTH=\"50\" BGCOLOR=\"%s\">", color); - /* Mark blocks not allowed in SCoP. */ - if (!basic_block_simple_for_scop_p (scop, bb)) - fprintf (file, "%d [style=\"bold,diagonals,filled\"];\n", - bb->index); + if (bb == scop->entry && bb == scop->exit) + fprintf (file, " %d*# </TD></TR> ", bb->index); + else if (bb == scop->entry) + fprintf (file, " %d* </TD></TR> ", bb->index); + else if (bb == scop->exit) + fprintf (file, " %d# </TD></TR> ", bb->index); + else + fprintf (file, " %d </TD></TR> ", bb->index); } - /* Print edges. */ + fprintf (file, "</TABLE>>, shape=box, style=\"setlinewidth(0)\"]\n"); + } + + /* Print edges and mark blocks not allowed in SCoP. */ + FOR_ALL_BB (bb) + { FOR_EACH_EDGE (e, ei, bb->succs) fprintf (file, "%d -> %d;\n", bb->index, e->dest->index); - } - /* Change the shape of the exit nodes. Don't change the shape of entry - nodes, as one node may be exit and entry at once and can not have two - different shapes. */ - for (i = 0; VEC_iterate (scop_p, current_scops, i, scop); i++) - fprintf (file, "%d [shape=box];\n", scop->exit->index); + for (i = 0; VEC_iterate (scop_p, current_scops, i, scop); i++) + if (bb_in_scop_p (bb, scop) || scop->exit == bb || scop->entry == bb) + if (!basic_block_simple_for_scop_p (scop, bb)) + fprintf (file, "%d [color=\"#000000\", style=filled]\n", + bb->index); + } fputs ("}\n\n", file); + /* Enable debugging again. */ dump_flags = tmp_dump_flags; } |