public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/arsenic/heads/analyzer_extension)] grammar fix
@ 2021-08-16 11:42 Ankur saini
  0 siblings, 0 replies; only message in thread
From: Ankur saini @ 2021-08-16 11:42 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:610e21f123cd06d7e37e04e2d734bac9e6553142

commit 610e21f123cd06d7e37e04e2d734bac9e6553142
Author: Ankur Saini <arsenic@sourceware.org>
Date:   Mon Aug 16 14:41:40 2021 +0530

    grammar fix

Diff:
---
 gcc/analyzer/engine.cc        |  4 ++--
 gcc/analyzer/exploded-graph.h |  4 ++--
 gcc/analyzer/state-purge.cc   | 21 ++++++++++-----------
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc
index 3bbc6558e6e..063ce6cc5ea 100644
--- a/gcc/analyzer/engine.cc
+++ b/gcc/analyzer/engine.cc
@@ -3028,7 +3028,7 @@ state_change_requires_new_enode_p (const program_state &old_state,
    underlying call superedge.
 
    Such case occurs when GCC's middle end didn't know which function to
-   call but analyzer do (with the help of current state).
+   call but the analyzer does (with the help of current state).
 
    Some example such calls are dynamically dispatched calls to virtual
    functions or calls that happen via function pointer.  */
@@ -3319,7 +3319,7 @@ exploded_graph::process_node (exploded_node *node)
 	    uncertainty_t uncertainty;
 
             /* Make use the current state and try to discover and analyse
-               indirect function calls (calls that doesn't hage underlying
+               indirect function calls (a call that doesn't have an underlying
                cgraph edge representing call).
 
                Some examples of such calls are virtual function calls
diff --git a/gcc/analyzer/exploded-graph.h b/gcc/analyzer/exploded-graph.h
index acfd5fd7167..192a4b3c8f8 100644
--- a/gcc/analyzer/exploded-graph.h
+++ b/gcc/analyzer/exploded-graph.h
@@ -362,8 +362,8 @@ private:
   DISABLE_COPY_AND_ASSIGN (exploded_edge);
 };
 
-/* Extra data for an exploded_edge that represents a dynamic call info ( calls
-   that doesn't have a superedge representing the call ).  */
+/* Extra data for an exploded_edge that represents dynamic call info ( calls
+   that doesn't have an underlying superedge representing the call ).  */
 
 class dynamic_call_info_t : public exploded_edge::custom_info_t
 {
diff --git a/gcc/analyzer/state-purge.cc b/gcc/analyzer/state-purge.cc
index c4050c2cf9a..8bd99e56e08 100644
--- a/gcc/analyzer/state-purge.cc
+++ b/gcc/analyzer/state-purge.cc
@@ -382,7 +382,16 @@ state_purge_per_ssa_name::process_point (const function_point &point,
 	      cgraph_edge *cedge
 		  = supergraph_call_edge (snode->m_fun,
 					  returning_call);
-	      if(!cedge)
+	      if(cedge)
+	        {
+		  superedge *sedge
+		    = map.get_sg ().get_intraprocedural_edge_for_call (cedge);
+		  gcc_assert (sedge);
+		  add_to_worklist 
+		    (function_point::after_supernode (sedge->m_src),
+		     worklist, logger);
+	        }
+	      else
 	        {
 	          supernode *callernode 
 	            = map.get_sg ().get_supernode_for_stmt (returning_call);
@@ -391,16 +400,6 @@ state_purge_per_ssa_name::process_point (const function_point &point,
 	          add_to_worklist 
 	            (function_point::after_supernode (callernode),
 		     worklist, logger);
-	        }
-	      else
-	        {
-		  gcc_assert (cedge);
-		  superedge *sedge
-		    = map.get_sg ().get_intraprocedural_edge_for_call (cedge);
-		  gcc_assert (sedge);
-		  add_to_worklist 
-		    (function_point::after_supernode (sedge->m_src),
-		     worklist, logger);
 	         }
 	    }
 	  }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-16 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 11:42 [gcc(refs/users/arsenic/heads/analyzer_extension)] grammar fix Ankur saini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).