From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7853) id E25BA3943417; Mon, 16 Aug 2021 11:42:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E25BA3943417 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Ankur saini To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/arsenic/heads/analyzer_extension)] grammar fix X-Act-Checkin: gcc X-Git-Author: Ankur Saini X-Git-Refname: refs/users/arsenic/heads/analyzer_extension X-Git-Oldrev: 3e97b8a6941715057e0c1f178e6fd41aa1c559a0 X-Git-Newrev: 610e21f123cd06d7e37e04e2d734bac9e6553142 Message-Id: <20210816114207.E25BA3943417@sourceware.org> Date: Mon, 16 Aug 2021 11:42:07 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 11:42:08 -0000 https://gcc.gnu.org/g:610e21f123cd06d7e37e04e2d734bac9e6553142 commit 610e21f123cd06d7e37e04e2d734bac9e6553142 Author: Ankur Saini 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); } } }