From 73f386581bddc4d630b93eeb0cddd32943bf24e7 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 3 Feb 2020 09:55:26 -0500 Subject: [PATCH] analyzer: show BBs in .dot dumps gcc/analyzer/ChangeLog: * engine.cc (supernode_cluster::dump_dot): Show BB index as well as SN index. * supergraph.cc (supernode::dump_dot): Likewise. --- gcc/analyzer/ChangeLog | 6 ++++++ gcc/analyzer/engine.cc | 3 ++- gcc/analyzer/supergraph.cc | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog index 9229bb1e74a..9b8820ede03 100644 --- a/gcc/analyzer/ChangeLog +++ b/gcc/analyzer/ChangeLog @@ -1,3 +1,9 @@ +2020-02-03 David Malcolm + + * engine.cc (supernode_cluster::dump_dot): Show BB index as + well as SN index. + * supergraph.cc (supernode::dump_dot): Likewise. + 2020-02-03 David Malcolm PR analyzer/93546 diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index 9acec704224..66ca37ea33b 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -2811,7 +2811,8 @@ public: (const void *)this); gv->indent (); gv->println ("style=\"dashed\";"); - gv->println ("label=\"SN: %i\";", m_supernode->m_index); + gv->println ("label=\"SN: %i (bb: %i)\";", + m_supernode->m_index, m_supernode->m_bb->index); int i; exploded_node *enode; diff --git a/gcc/analyzer/supergraph.cc b/gcc/analyzer/supergraph.cc index a5bf52d8aca..b20daa081d2 100644 --- a/gcc/analyzer/supergraph.cc +++ b/gcc/analyzer/supergraph.cc @@ -437,7 +437,7 @@ supernode::dump_dot (graphviz_out *gv, const dump_args_t &args) const gv->println("style=\"solid\";"); gv->println("color=\"black\";"); gv->println("fillcolor=\"lightgrey\";"); - gv->println("label=\"sn: %i\";", m_index); + gv->println("label=\"sn: %i (bb: %i)\";", m_index, m_bb->index); pretty_printer *pp = gv->get_pp (); -- 2.30.2