Commit 55d887b8 authored by Wei Wang's avatar Wei Wang
Browse files

[time-trace] Add optimizer and codegen regions to NPM

Optimizer and codegen regions were only added to legacy PM. Add
them to NPM as well.

Differential Revision: https://reviews.llvm.org/D117605
parent b1856009
Pipeline #186938 failed with stage
in 17 minutes and 43 seconds
......@@ -1492,8 +1492,11 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
}
// Now that we have all of the passes ready, run them.
PrettyStackTraceString CrashInfo("Optimizer");
MPM.run(*TheModule, MAM);
{
PrettyStackTraceString CrashInfo("Optimizer");
llvm::TimeTraceScope TimeScope("Optimizer");
MPM.run(*TheModule, MAM);
}
}
void EmitAssemblyHelper::RunCodegenPipeline(
......@@ -1525,8 +1528,11 @@ void EmitAssemblyHelper::RunCodegenPipeline(
return;
}
PrettyStackTraceString CrashInfo("Code generation");
CodeGenPasses.run(*TheModule);
{
PrettyStackTraceString CrashInfo("Code generation");
llvm::TimeTraceScope TimeScope("CodeGenPasses");
CodeGenPasses.run(*TheModule);
}
}
/// A clean version of `EmitAssembly` that uses the new pass manager.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment