diff options
author | Devin Coughlin <dcoughlin@apple.com> | 2015-09-11 20:14:05 +0000 |
---|---|---|
committer | Devin Coughlin <dcoughlin@apple.com> | 2015-09-11 20:14:05 +0000 |
commit | 0123af994ec5f46bd705c11b17fc14a2fefc4726 (patch) | |
tree | 65317fb1e9458c81c1edbea44d8db625b39d5b8a /clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | |
parent | 822e2887b956a1aa4c72a5920c7d060d1472c88b (diff) | |
download | bcm5719-llvm-0123af994ec5f46bd705c11b17fc14a2fefc4726.tar.gz bcm5719-llvm-0123af994ec5f46bd705c11b17fc14a2fefc4726.zip |
[analyzer] Add -analyzer-config option for function size the inliner considers as large
Add an option (-analyzer-config min-blocks-for-inline-large=14) to control the function
size the inliner considers as large, in relation to "max-times-inline-large". The option
defaults to the original hard coded behaviour, which I believe should be adjustable with
the other inlining settings.
The analyzer-config test has been modified so that the analyzer will reach the
getMinBlocksForInlineLarge() method and store the result in the ConfigTable, to ensure it
is dumped by the debug checker.
A patch by Sean Eveson!
Differential Revision: http://reviews.llvm.org/D12406
llvm-svn: 247463
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp index 93133ef4c4b..8b31a0db531 100644 --- a/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp +++ b/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp @@ -295,6 +295,13 @@ unsigned AnalyzerOptions::getMaxTimesInlineLarge() { return MaxTimesInlineLarge.getValue(); } +unsigned AnalyzerOptions::getMinCFGSizeTreatFunctionsAsLarge() { + if (!MinCFGSizeTreatFunctionsAsLarge.hasValue()) + MinCFGSizeTreatFunctionsAsLarge = getOptionAsInteger( + "min-cfg-size-treat-functions-as-large", 14); + return MinCFGSizeTreatFunctionsAsLarge.getValue(); +} + unsigned AnalyzerOptions::getMaxNodesPerTopLevelFunction() { if (!MaxNodesPerTopLevelFunction.hasValue()) { int DefaultValue = 0; |