Author: tcare
Date: Wed Sep 29 18:48:13 2010
New Revision: 115108
URL: http://llvm.org/viewvc/llvm-project?rev=115108&view=rev
Log:
Change -analyzer-max-nodes to allow 0 as a parameter. This allows the analyzer
to completely analyze a worklist regardless of time taken.
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/lib/Checker/GRCoreEngine.cpp
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=115108&r1=115107&r2=115108&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Wed Sep 29 18:48:13 2010
@@ -108,7 +108,7 @@
def analyzer_inline_call : Flag<"-analyzer-inline-call">,
HelpText<"Experimental transfer function inlining callees when its
definition is available.">;
def analyzer_max_nodes : Separate<"-analyzer-max-nodes">,
- HelpText<"The maximum number of nodes the analyzer can generate">;
+ HelpText<"The maximum number of nodes the analyzer can generate (150000
default, 0 = no limit)">;
def analyzer_max_loop : Separate<"-analyzer-max-loop">,
HelpText<"The maximum number of times the analyzer will go through a loop">;
Modified: cfe/trunk/lib/Checker/GRCoreEngine.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRCoreEngine.cpp?rev=115108&r1=115107&r2=115108&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRCoreEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRCoreEngine.cpp Wed Sep 29 18:48:13 2010
@@ -159,8 +159,16 @@
GenerateNode(StartLoc, InitState, 0);
}
- while (Steps && WList->hasWork()) {
- --Steps;
+ // Check if we have a steps limit
+ bool UnlimitedSteps = Steps == 0;
+
+ while (WList->hasWork()) {
+ if (!UnlimitedSteps) {
+ if (Steps == 0)
+ break;
+ --Steps;
+ }
+
const GRWorkListUnit& WU = WList->Dequeue();
// Set the current block counter.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits