Skip to content

Commit ae61f22

Browse files
grey-eminencesys_zuul
authored andcommitted
Add lazy built-in finctions loading to compilation timestats
Change-Id: Id1d11108c825512c8db276f4976c8ace728f1a47
1 parent dab7218 commit ae61f22

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

IGC/AdaptorOCL/dllInterfaceCompute.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,8 @@ bool TranslateBuild(
921921
// Load the builtin module - Generic BC
922922
// Load the builtin module - Generic BC
923923
{
924+
COMPILER_TIME_START(&oclContext, TIME_OCL_LazyBiFLoading);
925+
924926
char Resource[5] = { '-' };
925927
_snprintf(Resource, sizeof(Resource), "#%d", OCL_BC);
926928

@@ -952,6 +954,7 @@ bool TranslateBuild(
952954
SetErrorMessage("Error loading the Generic builtin module from buffer", *pOutputArgs);
953955
return false;
954956
}
957+
COMPILER_TIME_END(&oclContext, TIME_OCL_LazyBiFLoading);
955958
}
956959

957960
// Load the builtin module - pointer depended

IGC/common/Stats.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ void TimeStats::printTime( ShaderType type, ShaderHash hash ) const
663663

664664
// Skip printing PerPass info to CSV for now
665665
//pp.printPerPassTimeCSV( shaderName );
666+
pp.printSumTimeTable(llvm::dbgs());
666667
}
667668

668669
void TimeStats::printSumTime() const

IGC/common/timeStats.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
DEFINE_TIME_STAT( TIME_NONE, "None", MAX_COMPILE_TIME_INTERVALS, false, false, false, false )
1313
DEFINE_TIME_STAT( TIME_TOTAL, "Total", MAX_COMPILE_TIME_INTERVALS, false, false, true, true )
1414
DEFINE_TIME_STAT( TIME_ASMToLLVMIR, "ASMToLLVMIR", TIME_TOTAL, false, false, true, true )
15+
DEFINE_TIME_STAT( TIME_OCL_LazyBiFLoading, "OCL LazyBiFLoading", TIME_TOTAL, false, false, true, true )
1516
DEFINE_TIME_STAT( TIME_UnificationPasses, "UnificationPasses", TIME_TOTAL, false, false, true, true )
1617
DEFINE_TIME_STAT( TIME_OptimizationPasses, "OptimizationPasses", TIME_TOTAL, false, false, true, true )
1718
DEFINE_TIME_STAT( TIME_CodeGen, "CodeGen", TIME_TOTAL, false, false, false, true )

0 commit comments

Comments
 (0)