[01/11,analyzer] Fix up for params refactoring
diff mbox series

Message ID 1574284430-8776-2-git-send-email-dmalcolm@redhat.com
State New
Headers show
Series
  • Static analysis v2
Related show

Commit Message

David Malcolm Nov. 20, 2019, 9:13 p.m. UTC
gcc/ChangeLog:
	* analyzer/analysis-plan.cc: Remove include of "params.h".
	(analysis_plan::use_summary_p): Update for conversion of params to
	options.
	* analyzer/engine.cc: Remove include of "params.h".
	(exploded_graph::get_or_create_node): Update for conversion of
	params to options.
	(exploded_graph::process_worklist): Likewise.
	* analyzer/program-point.cc: Remove include of "params.h".
	(program_point::on_edge): Update for conversion of params to
	options.
---
 gcc/analyzer/analysis-plan.cc | 3 +--
 gcc/analyzer/engine.cc        | 6 ++----
 gcc/analyzer/program-point.cc | 3 +--
 3 files changed, 4 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/gcc/analyzer/analysis-plan.cc b/gcc/analyzer/analysis-plan.cc
index 920783b..38123ff 100644
--- a/gcc/analyzer/analysis-plan.cc
+++ b/gcc/analyzer/analysis-plan.cc
@@ -26,7 +26,6 @@  along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "timevar.h"
 #include "ipa-utils.h"
-#include "params.h"
 #include "analyzer/analyzer.h"
 #include "analyzer/analysis-plan.h"
 #include "analyzer/supergraph.h"
@@ -108,7 +107,7 @@  analysis_plan::use_summary_p (const cgraph_edge *edge) const
   /* Require the callee to be sufficiently complex to be worth
      summarizing.  */
   if ((int)m_sg.get_num_snodes (callee->get_fun ())
-      < PARAM_VALUE (PARAM_ANALYZER_MIN_SNODES_FOR_CALL_SUMMARY))
+      < param_analyzer_min_snodes_for_call_summary)
     return false;
 
   return true;
diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc
index 34941d2..c4ca5bf 100644
--- a/gcc/analyzer/engine.cc
+++ b/gcc/analyzer/engine.cc
@@ -23,7 +23,6 @@  along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "params.h"
 #include "gcc-rich-location.h"
 #include "analyzer/exploded-graph.h"
 #include "analyzer/analysis-plan.h"
@@ -1719,7 +1718,7 @@  exploded_graph::get_or_create_node (const program_point &point,
   /* Impose a limit on the number of enodes per program point, and
      simply stop if we exceed it.  */
   if ((int)per_point_data->m_enodes.length ()
-      > PARAM_VALUE (PARAM_ANALYZER_MAX_ENODES_PER_PROGRAM_POINT))
+      > param_analyzer_max_enodes_per_program_point)
     {
       log ("not creating enode; too many at program point");
       warning_at (point.get_location (), OPT_Wanalyzer_too_complex,
@@ -2044,8 +2043,7 @@  exploded_graph::process_worklist ()
 	 entry ENs, one per phi; the number of PK_AFTER_SUPERNODE ought
 	 to be equivalent to the number of supernodes multiplied by the
 	 number of states.  */
-      const int limit
-	= m_sg.num_nodes () * PARAM_VALUE (PARAM_ANALYZER_BB_EXPLOSION_FACTOR);
+      const int limit = m_sg.num_nodes () * param_analyzer_bb_explosion_factor;
       if (m_global_stats.m_num_nodes[PK_AFTER_SUPERNODE] > limit)
 	{
 	  log ("bailing out; too many nodes");
diff --git a/gcc/analyzer/program-point.cc b/gcc/analyzer/program-point.cc
index fcf77af..ea84238 100644
--- a/gcc/analyzer/program-point.cc
+++ b/gcc/analyzer/program-point.cc
@@ -25,7 +25,6 @@  along with GCC; see the file COPYING3.  If not see
 #include "tree.h"
 #include "gimple-pretty-print.h"
 #include "gcc-rich-location.h"
-#include "params.h"
 #include "analyzer/program-point.h"
 #include "analyzer/exploded-graph.h"
 #include "analyzer/analysis-plan.h"
@@ -262,7 +261,7 @@  program_point::on_edge (exploded_graph &eg,
 	   applies to recursion (and mutual recursion), not to
 	   general call stacks.  */
 	if (m_call_string.calc_recursion_depth ()
-	    > PARAM_VALUE (PARAM_ANALYZER_MAX_RECURSION_DEPTH))
+	    > param_analyzer_max_recursion_depth)
 	  {
 	    eg.log ("rejecting call edge: recursion limit exceeded");
 	    // TODO: issue a sorry for this?