File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1717#include " llvm/IR/IRPrintingPasses.h"
1818#include " llvm/IR/LLVMContext.h"
1919#include " llvm/Support/Debug.h"
20+ #include " llvm/Support/TimeProfiler.h" // HLSL Change
2021#include " llvm/Support/Timer.h"
2122#include " llvm/Support/raw_ostream.h"
2223using namespace llvm ;
@@ -199,6 +200,10 @@ bool LPPassManager::runOnFunction(Function &F) {
199200 LI = &LIWP.getLoopInfo ();
200201 bool Changed = false ;
201202
203+ // HLSL Change Begin - Support hierarchial time tracing.
204+ llvm::TimeTraceScope FunctionScope (" Loop Pass Manager Function" , F.getName ());
205+ // HLSL Change End
206+
202207 // Collect inherited analysis from Module level pass manager.
203208 populateInheritedAnalysis (TPM->activeStack );
204209
@@ -248,6 +253,10 @@ bool LPPassManager::runOnFunction(Function &F) {
248253 PassManagerPrettyStackEntry X (P, *CurrentLoop->getHeader ());
249254 TimeRegion PassTimer (getPassTimer (P));
250255
256+ // HLSL Change Begin - Support hierarchial time tracing.
257+ llvm::TimeTraceScope PassScope (" RunLoopPass" , P->getPassName ());
258+ // HLSL Change End - Support hierarchial time tracing.
259+
251260 Changed |= P->runOnLoop (CurrentLoop, *this );
252261 }
253262
You can’t perform that action at this time.
0 commit comments