r373142 - [TimeProfiler] Fix "OptModule" section and add new "Backend" sections

Anton Afanasyev via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 28 00:14:12 PDT 2019


Author: anton-afanasyev
Date: Sat Sep 28 00:14:12 2019
New Revision: 373142

URL: http://llvm.org/viewvc/llvm-project?rev=373142&view=rev
Log:
[TimeProfiler] Fix "OptModule" section and add new "Backend" sections

Remove unnecessary "OptModule" section. Add "PerFunctionPasses",
"PerModulePasses" and "CodeGenPasses" sections under "Backend" section.

Modified:
    cfe/trunk/lib/CodeGen/BackendUtil.cpp

Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=373142&r1=373141&r2=373142&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Sat Sep 28 00:14:12 2019
@@ -895,6 +895,7 @@ void EmitAssemblyHelper::EmitAssembly(Ba
 
   {
     PrettyStackTraceString CrashInfo("Per-function optimization");
+    llvm::TimeTraceScope TimeScope("PerFunctionPasses", StringRef(""));
 
     PerFunctionPasses.doInitialization();
     for (Function &F : *TheModule)
@@ -905,11 +906,13 @@ void EmitAssemblyHelper::EmitAssembly(Ba
 
   {
     PrettyStackTraceString CrashInfo("Per-module optimization passes");
+    llvm::TimeTraceScope TimeScope("PerModulePasses", StringRef(""));
     PerModulePasses.run(*TheModule);
   }
 
   {
     PrettyStackTraceString CrashInfo("Code generation");
+    llvm::TimeTraceScope TimeScope("CodeGenPasses", StringRef(""));
     CodeGenPasses.run(*TheModule);
   }
 




More information about the cfe-commits mailing list