diff mbox series

[committed] analyzer: fixes to -fdump-analyzer-state-purge

Message ID 20220317224033.4160351-1-dmalcolm@redhat.com
State New
Headers show
Series [committed] analyzer: fixes to -fdump-analyzer-state-purge | expand

Commit Message

David Malcolm March 17, 2022, 10:40 p.m. UTC
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r12-7695-g79e210f0c8e1fa

gcc/analyzer/ChangeLog:
	* state-purge.cc (state_purge_annotator::add_node_annotations):
	Avoid duplicate before-supernode annotations when returning from
	an interprocedural call.  Show after-supernode annotations.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 gcc/analyzer/state-purge.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/analyzer/state-purge.cc b/gcc/analyzer/state-purge.cc
index e99c9cb593e..c37234ff16a 100644
--- a/gcc/analyzer/state-purge.cc
+++ b/gcc/analyzer/state-purge.cc
@@ -499,11 +499,12 @@  state_purge_annotator::add_node_annotations (graphviz_out *gv,
    /* Different in-edges mean different names need purging.
       Determine which points to dump.  */
    auto_vec<function_point> points;
-   if (n.entry_p ())
+   if (n.entry_p () || n.m_returning_call)
      points.safe_push (function_point::before_supernode (&n, NULL));
    else
      for (auto inedge : n.m_preds)
        points.safe_push (function_point::before_supernode (&n, inedge));
+   points.safe_push (function_point::after_supernode (&n));
 
    for (auto & point : points)
      {