From: Anton Afanasyev Date: Sat, 28 Sep 2019 07:14:12 +0000 (+0000) Subject: [TimeProfiler] Fix "OptModule" section and add new "Backend" sections X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95e1920019249e0a20e850ca678d46df9c7b57e7;p=clang [TimeProfiler] Fix "OptModule" section and add new "Backend" sections Remove unnecessary "OptModule" section. Add "PerFunctionPasses", "PerModulePasses" and "CodeGenPasses" sections under "Backend" section. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373142 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 71ae8fd4fb..469aa0c9e0 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -895,6 +895,7 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, { PrettyStackTraceString CrashInfo("Per-function optimization"); + llvm::TimeTraceScope TimeScope("PerFunctionPasses", StringRef("")); PerFunctionPasses.doInitialization(); for (Function &F : *TheModule) @@ -905,11 +906,13 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, { 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); }