r206999 - Don't pass llvm::DenseSet<> by value.
Alexander Kornienko
alexfh at google.com
Wed Apr 23 09:39:41 PDT 2014
Author: alexfh
Date: Wed Apr 23 11:39:41 2014
New Revision: 206999
URL: http://llvm.org/viewvc/llvm-project?rev=206999&view=rev
Log:
Don't pass llvm::DenseSet<> by value.
Summary: Fixes massive performance problems on large translation units.
Reviewers: jordan_rose
Reviewed By: jordan_rose
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3471
Modified:
cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp?rev=206999&r1=206998&r2=206999&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp Wed Apr 23 11:39:41 2014
@@ -307,7 +307,7 @@ public:
/// analyzed. This allows to redefine the default inlining policies when
/// analyzing a given function.
ExprEngine::InliningModes
- getInliningModeForFunction(const Decl *D, SetOfConstDecls Visited);
+ getInliningModeForFunction(const Decl *D, const SetOfConstDecls &Visited);
/// \brief Build the call graph for all the top level decls of this TU and
/// use it to define the order in which the functions should be visited.
@@ -414,8 +414,8 @@ void AnalysisConsumer::storeTopLevelDecl
}
static bool shouldSkipFunction(const Decl *D,
- SetOfConstDecls Visited,
- SetOfConstDecls VisitedAsTopLevel) {
+ const SetOfConstDecls &Visited,
+ const SetOfConstDecls &VisitedAsTopLevel) {
if (VisitedAsTopLevel.count(D))
return true;
@@ -435,7 +435,7 @@ static bool shouldSkipFunction(const Dec
ExprEngine::InliningModes
AnalysisConsumer::getInliningModeForFunction(const Decl *D,
- SetOfConstDecls Visited) {
+ const SetOfConstDecls &Visited) {
// We want to reanalyze all ObjC methods as top level to report Retain
// Count naming convention errors more aggressively. But we should tune down
// inlining when reanalyzing an already inlined function.
More information about the cfe-commits
mailing list