]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
analyzer: fixes to -fdump-analyzer-state-purge
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 17 Mar 2022 20:08:59 +0000 (16:08 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 17 Mar 2022 22:38:00 +0000 (18:38 -0400)
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

index e99c9cb593ec23a585f64f3b35b6311443c34b50..c37234ff16aefdf9d5a725b86d8f066f3afa1859 100644 (file)
@@ -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)
      {