Page MenuHomePhabricator

D60782.diff
No OneTemporary

File Metadata

Created
Sun, Jun 16, 10:25 PM

D60782.diff

Index: llvm/trunk/lib/IR/LegacyPassManager.cpp
===================================================================
--- llvm/trunk/lib/IR/LegacyPassManager.cpp
+++ llvm/trunk/lib/IR/LegacyPassManager.cpp
@@ -1629,14 +1629,14 @@
FunctionSize = F.getInstructionCount();
}
- bool ProfileTime = llvm::timeTraceProfilerEnabled();
- if (ProfileTime)
- llvm::timeTraceProfilerBegin("OptFunction", F.getName());
+ llvm::TimeTraceScope FunctionScope("OptFunction", F.getName());
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
FunctionPass *FP = getContainedPass(Index);
bool LocalChanged = false;
+ llvm::TimeTraceScope PassScope("RunPass", FP->getPassName());
+
dumpPassInfo(FP, EXECUTION_MSG, ON_FUNCTION_MSG, F.getName());
dumpRequiredSet(FP);
@@ -1674,9 +1674,6 @@
removeDeadPasses(FP, F.getName(), ON_FUNCTION_MSG);
}
- if (ProfileTime)
- llvm::timeTraceProfilerEnd();
-
return Changed;
}

Event Timeline