This param name is confusing, due to it changing meaning in
r16-6063-g0b786d961d4426. Update the name to better express what it now
controls, and clarify the wording of the warning that fires when that
limit is hit by the analyzer, and to give more info.
gcc/analyzer/ChangeLog:
* analyzer.opt (-param=analyzer-bb-explosion-factor=): Rename to...
(-param=analyzer-supernode-explosion-factor=): ...this.
* engine.cc (exploded_graph::process_worklist): Update for change
to param name. Clarify the -Wanalyzer-too-complex message when
hitting the overall limit on enodes by also showing the number
of snodes.
gcc/ChangeLog:
* doc/analyzer.texi: Update for change in param name.
* doc/params.texi: Likewise. Clarify wording.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/fibonacci.c: Update for change in message
wording.
* c-c++-common/analyzer/raw-data-cst-pr117262-1.c: Update for
change in param name.
* gcc.dg/analyzer/explode-2a.c: Likewise.
* gcc.dg/analyzer/pr93032-mztools-signed-char.c: Likewise.
* gcc.dg/analyzer/pr93032-mztools-unsigned-char.c: Likewise.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
; Please try to keep this file in ASCII collating order.
--param=analyzer-bb-explosion-factor=
-Common Joined UInteger Var(param_analyzer_bb_explosion_factor) Init(5) Param
-The maximum number of 'after supernode' exploded nodes within the analyzer per supernode, before terminating analysis.
-
-param=analyzer-max-enodes-per-program-point=
Common Joined UInteger Var(param_analyzer_max_enodes_per_program_point) Init(8) Param
The maximum number of exploded nodes per program point within the analyzer, before terminating analysis of that point.
Common Joined UInteger Var(param_analyzer_max_enodes_for_full_dump) Init(200) Param
The maximum depth of exploded nodes that should appear in a dot dump before switching to a less verbose format.
+-param=analyzer-supernode-explosion-factor=
+Common Joined UInteger Var(param_analyzer_supernode_explosion_factor) Init(5) Param
+The maximum number of exploded nodes within the analyzer per supernode, before terminating analysis.
+
-param=analyzer-text-art-string-ellipsis-threshold=
Common Joined UInteger Var(param_analyzer_text_art_string_ellipsis_threshold) Init(15) Param
The number of bytes at which to ellipsize string literals in analyzer text art diagrams.
explosion (or bugs). */
const int limit
= (// Per-supernode limit:
- (m_sg.num_nodes () * param_analyzer_bb_explosion_factor)
+ (m_sg.num_nodes () * param_analyzer_supernode_explosion_factor)
// Allow one for the "origin" enode:
+ 1);
if (m_global_stats.m_num_nodes > limit)
warning_at (node->get_point ().get_location (),
OPT_Wanalyzer_too_complex,
"analysis bailed out early"
- " (%i enodes)",
- m_nodes.length ());
+ " (%i enodes for %i snodes)",
+ m_nodes.length (),
+ m_sg.num_nodes ());
return;
}
}
The gimple representation can be seen using @option{-fdump-ipa-analyzer}.
@quotation Tip
If the analyzer ICEs before this is written out, one workaround is to use
-@option{--param=analyzer-bb-explosion-factor=0} to force the analyzer
+@option{--param=analyzer-supernode-explosion-factor=0} to force the analyzer
to bail out after analyzing the first basic block.
@end quotation
The number of executions of a basic block that is considered hot.
The parameter is used only in GIMPLE FE.
-@paindex analyzer-bb-explosion-factor
-@item analyzer-bb-explosion-factor
-The maximum number of ``after supernode'' exploded nodes within the analyzer
+@paindex analyzer-supernode-explosion-factor
+@item analyzer-supernode-explosion-factor
+The maximum number of exploded nodes within the analyzer
per supernode, before terminating analysis.
@paindex analyzer-text-art-string-ellipsis-threshold
return n;
}
-/* { dg-regexp "\[^\n\r\]+: warning: analysis bailed out early \\(\[0-9\]+ enodes\\) \[^\n\r\]*" } */
+/* { dg-regexp "\[^\n\r\]+: warning: analysis bailed out early \\(\[0-9\]+ enodes for \[0-9\]+ snodes\\) \[^\n\r\]*" } */
-/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=50 --param analyzer-bb-explosion-factor=50" } */
+/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=50 --param analyzer-supernode-explosion-factor=50" } */
int
main ()
/* PR analyzer/101068. */
-/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=200 --param analyzer-bb-explosion-factor=50" } */
+/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=200 --param analyzer-supernode-explosion-factor=50" } */
#include <stdlib.h>
/* { dg-require-effective-target int32plus } */
/* TODO (PR analyzer/112528): remove need for this. */
-/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=200 --param analyzer-bb-explosion-factor=50" } */
+/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=200 --param analyzer-supernode-explosion-factor=50" } */
/* Minimal replacement of system headers. */
/* { dg-require-effective-target int32plus } */
/* TODO (PR analyzer/112528): remove need for this. */
-/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=200 --param analyzer-bb-explosion-factor=50" } */
+/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=200 --param analyzer-supernode-explosion-factor=50" } */
/* Minimal replacement of system headers. */