aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA/CallGraphSCCPass.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-03-05 20:01:30 +0000
committerDevang Patel <dpatel@apple.com>2007-03-05 20:01:30 +0000
commit7f99761143cdf1ad23729708e3dcaa055b189406 (patch)
tree1455bd84e2e315441b320f3c2a4e23e1872794fc /lib/Analysis/IPA/CallGraphSCCPass.cpp
parent55d5ac7b5bd2c89da52398cb4347552e94f2d06d (diff)
Avoid constructing std::strings unless pass debugging is ON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/CallGraphSCCPass.cpp')
-rw-r--r--lib/Analysis/IPA/CallGraphSCCPass.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp
index c317a112f5..fcf4202826 100644
--- a/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -77,9 +77,6 @@ bool CGPassManager::runOnModule(Module &M) {
CallGraph &CG = getAnalysis<CallGraph>();
bool Changed = doInitialization(CG);
- std::string Msg1 = "Executing Pass '";
- std::string Msg3 = "' Made Modification '";
-
// Walk SCC
for (scc_iterator<CallGraph*> I = scc_begin(&CG), E = scc_end(&CG);
I != E; ++I) {
@@ -91,8 +88,7 @@ bool CGPassManager::runOnModule(Module &M) {
AnalysisUsage AnUsage;
P->getAnalysisUsage(AnUsage);
- std::string Msg2 = "' on Call Graph ...\n'";
- dumpPassInfo(P, Msg1, Msg2);
+ dumpPassInfo(P, EXECUTION_MSG, ON_CG_MSG, "");
dumpAnalysisSetInfo("Required", P, AnUsage.getRequiredSet());
initializeAnalysisImpl(P);
@@ -109,21 +105,20 @@ bool CGPassManager::runOnModule(Module &M) {
for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
Function *F = SCC[i]->getFunction();
if (F) {
- std::string Msg4 = "' on Function '" + F->getName() + "'...\n";
- dumpPassInfo(P, Msg1, Msg4);
- Changed |= FPP->runOnFunction(*F);
+ dumpPassInfo(P, EXECUTION_MSG, ON_FUNCTION_MSG, F->getName());
+ Changed |= FPP->runOnFunction(*F);
}
}
}
StopPassTimer(P);
if (Changed)
- dumpPassInfo(P, Msg3, Msg2);
+ dumpPassInfo(P, MODIFICATION_MSG, ON_CG_MSG, "");
dumpAnalysisSetInfo("Preserved", P, AnUsage.getPreservedSet());
removeNotPreservedAnalysis(P);
recordAvailableAnalysis(P);
- removeDeadPasses(P, Msg2);
+ removeDeadPasses(P, "", ON_CG_MSG);
}
}
Changed |= doFinalization(CG);