aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Ilseman <milseman@apple.com>2013-02-26 01:31:59 +0000
committerMichael Ilseman <milseman@apple.com>2013-02-26 01:31:59 +0000
commitce522ee0a27062390f13e7ccb53fcff4fc36c473 (patch)
treed8d9d373d0ac48564123f90d8bc19cfa226c6d8f /include
parent70cdcd5114b30c4983ff158278422ea129bd27bb (diff)
downloadexternal_llvm-ce522ee0a27062390f13e7ccb53fcff4fc36c473.zip
external_llvm-ce522ee0a27062390f13e7ccb53fcff4fc36c473.tar.gz
external_llvm-ce522ee0a27062390f13e7ccb53fcff4fc36c473.tar.bz2
Use a DenseMap instead of a std::map for AnalysisID -> Pass* maps. This reduces the pass-manager overhead from FPPassManager::runOnFunction() by about 10%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/PassManagers.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h
index fac7928..7afb0a0 100644
--- a/include/llvm/PassManagers.h
+++ b/include/llvm/PassManagers.h
@@ -352,7 +352,7 @@ public:
return PMT_Unknown;
}
- std::map<AnalysisID, Pass*> *getAvailableAnalysis() {
+ DenseMap<AnalysisID, Pass*> *getAvailableAnalysis() {
return &AvailableAnalysis;
}
@@ -375,8 +375,7 @@ protected:
// Collection of Analysis provided by Parent pass manager and
// used by current pass manager. At at time there can not be more
// then PMT_Last active pass mangers.
- std::map<AnalysisID, Pass *> *InheritedAnalysis[PMT_Last];
-
+ DenseMap<AnalysisID, Pass *> *InheritedAnalysis[PMT_Last];
/// isPassDebuggingExecutionsOrMore - Return true if -debug-pass=Executions
/// or higher is specified.
@@ -390,7 +389,7 @@ private:
// pass. If a pass requires an analysis which is not available then
// the required analysis pass is scheduled to run before the pass itself is
// scheduled to run.
- std::map<AnalysisID, Pass*> AvailableAnalysis;
+ DenseMap<AnalysisID, Pass*> AvailableAnalysis;
// Collection of higher level analysis used by the pass managed by
// this manager.