summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Frontend
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-07-02 20:21:52 +0000
committerTed Kremenek <kremenek@apple.com>2012-07-02 20:21:52 +0000
commitde21a1c964a0afc9846baeca4b1cb1c85d223708 (patch)
tree859939fcd767602985b4227e4490c9c18c81739f /clang/lib/StaticAnalyzer/Frontend
parent146ef384da1428eaab5c0979418aa0daef3ed45e (diff)
downloadbcm5719-llvm-de21a1c964a0afc9846baeca4b1cb1c85d223708.tar.gz
bcm5719-llvm-de21a1c964a0afc9846baeca4b1cb1c85d223708.zip
Bail out the LiveVariables analysis when the CFG is very large, as
we are encountering some scalability issues with memory usage. The appropriate long term fix is to make the analysis more scalable, but this will at least prevent the analyzer swapping when analyzing very large functions. llvm-svn: 159578
Diffstat (limited to 'clang/lib/StaticAnalyzer/Frontend')
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index 05fb0155f13..520a975bda5 100644
--- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -523,6 +523,10 @@ void AnalysisConsumer::ActionExprEngine(Decl *D, bool ObjCGCEnabled,
if (!Mgr->getCFG(D))
return;
+ // See if the LiveVariables analysis scales.
+ if (!Mgr->getAnalysisDeclContext(D)->getAnalysis<RelaxedLiveVariables>())
+ return;
+
ExprEngine Eng(*Mgr, ObjCGCEnabled, VisitedCallees, &FunctionSummaries);
// Set the graph auditor.
OpenPOWER on IntegriCloud