diff options
author | Devang Patel <dpatel@apple.com> | 2007-08-10 18:29:32 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-08-10 18:29:32 +0000 |
commit | 6b4af744b844ba5cf319614b6a27d213548706ee (patch) | |
tree | cde6103c502578f9c432724483eb01a32d58d40c /lib/VMCore/PassManager.cpp | |
parent | 423c8b29b80bf1bca70f0c41a72f72f6b41d8540 (diff) | |
download | external_llvm-6b4af744b844ba5cf319614b6a27d213548706ee.zip external_llvm-6b4af744b844ba5cf319614b6a27d213548706ee.tar.gz external_llvm-6b4af744b844ba5cf319614b6a27d213548706ee.tar.bz2 |
Do not overuse std::string. Pass around char * directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41001 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/PassManager.cpp')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index dc23a26..7e0baeb 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -650,7 +650,7 @@ void PMDataManager::removeNotPreservedAnalysis(Pass *P) { } /// Remove analysis passes that are not used any longer -void PMDataManager::removeDeadPasses(Pass *P, const std::string &Msg, +void PMDataManager::removeDeadPasses(Pass *P, const char *Msg, enum PassDebuggingString DBG_STR) { SmallVector<Pass *, 12> DeadPasses; @@ -856,7 +856,7 @@ void PMDataManager::dumpPassArguments() const { void PMDataManager::dumpPassInfo(Pass *P, enum PassDebuggingString S1, enum PassDebuggingString S2, - const std::string &Msg) { + const char *Msg) { if (PassDebugging < Executions) return; cerr << (void*)this << std::string(getDepth()*2+1, ' '); @@ -961,7 +961,7 @@ BBPassManager::runOnFunction(Function &F) { AnalysisUsage AnUsage; BP->getAnalysisUsage(AnUsage); - dumpPassInfo(BP, EXECUTION_MSG, ON_BASICBLOCK_MSG, I->getName()); + dumpPassInfo(BP, EXECUTION_MSG, ON_BASICBLOCK_MSG, I->getNameStart()); dumpAnalysisSetInfo("Required", BP, AnUsage.getRequiredSet()); initializeAnalysisImpl(BP); @@ -971,13 +971,13 @@ BBPassManager::runOnFunction(Function &F) { if (TheTimeInfo) TheTimeInfo->passEnded(BP); if (Changed) - dumpPassInfo(BP, MODIFICATION_MSG, ON_BASICBLOCK_MSG, I->getName()); + dumpPassInfo(BP, MODIFICATION_MSG, ON_BASICBLOCK_MSG, I->getNameStart()); dumpAnalysisSetInfo("Preserved", BP, AnUsage.getPreservedSet()); verifyPreservedAnalysis(BP); removeNotPreservedAnalysis(BP); recordAvailableAnalysis(BP); - removeDeadPasses(BP, I->getName(), ON_BASICBLOCK_MSG); + removeDeadPasses(BP, I->getNameStart(), ON_BASICBLOCK_MSG); } return Changed |= doFinalization(F); @@ -1159,7 +1159,7 @@ bool FPPassManager::runOnFunction(Function &F) { AnalysisUsage AnUsage; FP->getAnalysisUsage(AnUsage); - dumpPassInfo(FP, EXECUTION_MSG, ON_FUNCTION_MSG, F.getName()); + dumpPassInfo(FP, EXECUTION_MSG, ON_FUNCTION_MSG, F.getNameStart()); dumpAnalysisSetInfo("Required", FP, AnUsage.getRequiredSet()); initializeAnalysisImpl(FP); @@ -1169,13 +1169,13 @@ bool FPPassManager::runOnFunction(Function &F) { if (TheTimeInfo) TheTimeInfo->passEnded(FP); if (Changed) - dumpPassInfo(FP, MODIFICATION_MSG, ON_FUNCTION_MSG, F.getName()); + dumpPassInfo(FP, MODIFICATION_MSG, ON_FUNCTION_MSG, F.getNameStart()); dumpAnalysisSetInfo("Preserved", FP, AnUsage.getPreservedSet()); verifyPreservedAnalysis(FP); removeNotPreservedAnalysis(FP); recordAvailableAnalysis(FP); - removeDeadPasses(FP, F.getName(), ON_FUNCTION_MSG); + removeDeadPasses(FP, F.getNameStart(), ON_FUNCTION_MSG); } return Changed; } @@ -1228,7 +1228,7 @@ MPPassManager::runOnModule(Module &M) { AnalysisUsage AnUsage; MP->getAnalysisUsage(AnUsage); - dumpPassInfo(MP, EXECUTION_MSG, ON_MODULE_MSG, M.getModuleIdentifier()); + dumpPassInfo(MP, EXECUTION_MSG, ON_MODULE_MSG, M.getModuleIdentifier().c_str()); dumpAnalysisSetInfo("Required", MP, AnUsage.getRequiredSet()); initializeAnalysisImpl(MP); @@ -1238,13 +1238,13 @@ MPPassManager::runOnModule(Module &M) { if (TheTimeInfo) TheTimeInfo->passEnded(MP); if (Changed) - dumpPassInfo(MP, MODIFICATION_MSG, ON_MODULE_MSG, M.getModuleIdentifier()); + dumpPassInfo(MP, MODIFICATION_MSG, ON_MODULE_MSG, M.getModuleIdentifier().c_str()); dumpAnalysisSetInfo("Preserved", MP, AnUsage.getPreservedSet()); verifyPreservedAnalysis(MP); removeNotPreservedAnalysis(MP); recordAvailableAnalysis(MP); - removeDeadPasses(MP, M.getModuleIdentifier(), ON_MODULE_MSG); + removeDeadPasses(MP, M.getModuleIdentifier().c_str(), ON_MODULE_MSG); } return Changed; } |