[gcc(refs/users/marxin/heads/improve-dot-output)] graph output: use better colors for edges

Martin Liska marxin@gcc.gnu.org
Wed Sep 1 09:07:36 GMT 2021


https://gcc.gnu.org/g:65652fc7530b17b5ea51534aaed876b8ad527f97

commit 65652fc7530b17b5ea51534aaed876b8ad527f97
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Sep 1 10:59:47 2021 +0200

    graph output: use better colors for edges
    
    gcc/ChangeLog:
    
            * graph.c (draw_cfg_node_succ_edges): Do not color fallthru
              edges and rather use colors for TRUE and FALSE edges.

Diff:
---
 gcc/graph.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/graph.c b/gcc/graph.c
index ce8de33ffe1..9acd1d5b95e 100644
--- a/gcc/graph.c
+++ b/gcc/graph.c
@@ -133,10 +133,11 @@ draw_cfg_node_succ_edges (pretty_printer *pp, int funcdef_no, basic_block bb)
 	  weight = 10;
 	}
       else if (e->flags & EDGE_FALLTHRU)
-	{
-	  color = "blue";
-	  weight = 100;
-	}
+	weight = 100;
+      else if (e->flags & EDGE_TRUE_VALUE)
+	color = "forestgreen";
+      else if (e->flags & EDGE_FALSE_VALUE)
+	color = "darkorange";
 
       if (e->flags & EDGE_ABNORMAL)
 	color = "red";


More information about the Gcc-cvs mailing list