diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-17 23:14:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-17 23:14:24 +0000 |
commit | 63925c831ae17a6f894744dbc153dbc9ed4c1902 (patch) | |
tree | 2fb7c8024bfd2061fca189a9b0efa4f85bbcb1d8 | |
parent | c72f28042b11a329db721b816fdee957f6aac9d4 (diff) | |
download | external_llvm-63925c831ae17a6f894744dbc153dbc9ed4c1902.zip external_llvm-63925c831ae17a6f894744dbc153dbc9ed4c1902.tar.gz external_llvm-63925c831ae17a6f894744dbc153dbc9ed4c1902.tar.bz2 |
temporarily revert Devang's most recent patch, which caused a large
compile-time regression in LLC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34385 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/PassManagers.h | 5 | ||||
-rw-r--r-- | lib/VMCore/PassManager.cpp | 20 |
2 files changed, 4 insertions, 21 deletions
diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h index 4b82c98..bd3672f 100644 --- a/include/llvm/PassManagers.h +++ b/include/llvm/PassManagers.h @@ -120,10 +120,6 @@ public: /// Collect passes whose last user is P void collectLastUses(std::vector<Pass *> &LastUses, Pass *P); - // Walk LastUser map and create inverted map. This should be done - // after all passes are added and before running first pass. - void collectInvertedLU(); - /// Find the pass that implements Analysis AID. Search immutable /// passes and all pass managers. If desired pass is not found /// then return NULL. @@ -175,7 +171,6 @@ private: // Map to keep track of last user of the analysis pass. // LastUser->second is the last user of Lastuser->first. std::map<Pass *, Pass *> LastUser; - std::map<Pass *, std::vector <Pass *> > InvertedLU; /// Immutable passes are managed by top level manager. std::vector<ImmutablePass *> ImmutablePasses; diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 6c1f236..bc85967 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -362,19 +362,13 @@ void PMTopLevelManager::setLastUser(std::vector<Pass *> &AnalysisPasses, } } -// Walk LastUser map and create inverted map. This should be done -// after all passes are added and before running first pass. -void PMTopLevelManager::collectInvertedLU() { - for (std::map<Pass *, Pass *>::iterator LUI = LastUser.begin(), - LUE = LastUser.end(); LUI != LUE; ++LUI) - InvertedLU[LUI->second].push_back(LUI->first); -} - /// Collect passes whose last user is P void PMTopLevelManager::collectLastUses(std::vector<Pass *> &LastUses, Pass *P) { - std::vector<Pass *>&LU = InvertedLU[P]; - LastUses.insert(LastUses.end(), LU.begin(), LU.end()); + for (std::map<Pass *, Pass *>::iterator LUI = LastUser.begin(), + LUE = LastUser.end(); LUI != LUE; ++LUI) + if (LUI->second == P) + LastUses.push_back(LUI->first); } /// Schedule pass P for execution. Make sure that passes required by @@ -944,9 +938,6 @@ bool FunctionPassManagerImpl::run(Function &F) { dumpArguments(); dumpPasses(); - // Collect inverted map of LastUsers. This improves speed of - // collectLastUses(). - TPM->collectInvertedLU(); initializeAllAnalysisInfo(); for (unsigned Index = 0; Index < getNumContainedManagers(); ++Index) { FPPassManager *FP = getContainedManager(Index); @@ -1095,9 +1086,6 @@ bool PassManagerImpl::run(Module &M) { dumpArguments(); dumpPasses(); - // Collect inverted map of LastUsers. This improves speed of - // collectLastUses(). - TPM->collectInvertedLU(); initializeAllAnalysisInfo(); for (unsigned Index = 0; Index < getNumContainedManagers(); ++Index) { MPPassManager *MP = getContainedManager(Index); |