// We have two ways to measure pass time. For LLVM pass, we will create a
// module pass before and after the pass, while this will impact the pass 
// manager on pass scheduling.  For IGC pass, we will measure it inside the 
// pass.  For IGC pass, the timer need to be declared as coarse timer.  When
// adding pass timer, we will check that flag to avoid adding the timer pass.
//
//                enumName                                      stringName                                 parentEnum                          isVISATimer    isUnaccounted   isCoarseTimer   isDashBoardTimer
//                --------                                      ----------                                 ----------                          -----------    -------------   -------------   ----------------
DEFINE_TIME_STAT(  TIME_NONE,                                    "None",                                   MAX_COMPILE_TIME_INTERVALS,         false,         false,          false,          false )
DEFINE_TIME_STAT(  TIME_TOTAL,                                   "Total",                                  MAX_COMPILE_TIME_INTERVALS,         false,         false,          true,           true )
DEFINE_TIME_STAT(    TIME_ASMToLLVMIR,                           "ASMToLLVMIR",                            TIME_TOTAL,                         false,         false,          true,           true )
DEFINE_TIME_STAT(    TIME_UnificationPasses,                     "UnificationPasses",                      TIME_TOTAL,                         false,         false,          true,           true )
DEFINE_TIME_STAT(    TIME_OptimizationPasses,                    "OptimizationPasses",                     TIME_TOTAL,                         false,         false,          true,           true )
DEFINE_TIME_STAT(    TIME_CodeGen,                               "CodeGen",                                TIME_TOTAL,                         false,         false,          true,           false )
DEFINE_TIME_STAT(      TIME_CG_vISAEmitPass,                     "vISAEmitpass",                           TIME_CodeGen,                       false,         false,          true,           true )
DEFINE_TIME_STAT(         TIME_vISAEmitInit,                     "vISAEmitInit",                           TIME_CG_vISAEmitPass,               false,         false,          false,          false )
DEFINE_TIME_STAT(         TIME_vISAEmitLoop,                     "vISAEmitLoop",                           TIME_CG_vISAEmitPass,               false,         false,          false,          false )
DEFINE_TIME_STAT(         TIME_vISAEmitPayloadInputs,            "vISAEmitPayloadInputs",                  TIME_CG_vISAEmitPass,               false,         false,          false,          false )
DEFINE_TIME_STAT(         TIME_vISAEmitDestroy,                  "vISAEmitDestroy",                        TIME_CG_vISAEmitPass,               false,         false,          false,          false )
DEFINE_TIME_STAT(         TIME_vISAEmitPass_Unaccounted,         "vISAEmit_Unaccounted",                   TIME_CG_vISAEmitPass,               false,         true,           false,          false )
DEFINE_TIME_STAT(      TIME_CG_vISACompile,                      "vISACompile",                            TIME_CodeGen,                       false,         false,          true,           true )
DEFINE_TIME_STAT(         TIME_VISA_Total,                       "VISA Total",                             TIME_CG_vISACompile,                true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_Builder,                   "VISA Builder",                           TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_BuildIR,                   "VISA Build IR",                          TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_CFG,                       "VISA CFG",                               TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_Optimizer,                 "VISA Optimizer",                         TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_HWConformity,              "VISA HW Conformity",                     TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_MiscOpts,                  "VISA Misc opts",                         TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_TotalRA,                   "VISA Total RA",                          TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(             TIME_VISA_LocalRA,                 "VISA Local RA",                          TIME_VISA_TotalRA,                  true,          false,          true,           false )
DEFINE_TIME_STAT(             TIME_VISA_GRFGlobalRA,             "VISA GRF Global RA",                     TIME_VISA_TotalRA,                  true,          false,          true,           false )
DEFINE_TIME_STAT(           TIMER_VISA_PreRA_Scheduling,         "VISA PreRA Scheduling",                  TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIMER_VISA_NoDD,                     "VISA NoDD",                              TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_Scheduling,                "VISA Scheduling",                        TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_EncodeAndEmit,             "VISA Encode and Emit",                   TIME_VISA_Total,                    true,          false,          true,           false )
DEFINE_TIME_STAT(           TIME_VISA_BUILDER_APPEND_INST,       "VISA Builder Append Instruction",        TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_BUILDER_CREATE_VAR,        "VISA Builder Create Var",                TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_BUIDLER_CREATE_INPUT_VAR,  "VISA Builder Create Input Var",          TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_BUILDER_CREATE_OPND,       "VISA Builder Create Operand",            TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_BUILDER_MISC,              "VISA Builder Misc",                      TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_BUILDER_BUILDER,           "VISA Builder Builder",                   TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_BUILDER_IR_CONSTRUCTION,   "VISA Builder IR Construction",           TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_ENCODE_COMPACTION,         "VISA Compaction during encoding",        TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_ENCODE_TOTAL,              "VISA Total Encoding",                    TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_IGA_ENCODER,               "VISA IGA Encoding",                      TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_NOSRCDEPSET,               "VISA NoSrcDepSet",                       TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_ENCODE_PER_KERNEL_ENCOD,   "VISA per kernel encoding",               TIME_VISA_Total,                    true,          false,          false,          false )
DEFINE_TIME_STAT(           TIME_VISA_Unaccounted,               "VISA Total Unaccounted",                 TIME_VISA_Total,                    false,         true,           false,          false )
DEFINE_TIME_STAT(         TIME_vISACompile_Unaccounted,          "vISACompile Unaccounted",                TIME_CG_vISACompile,                false,         true,           false,          false )
DEFINE_TIME_STAT(       TIME_CG_Unaccounted,                     "CodeGen Unaccounted",                    TIME_CodeGen,                       false,         true,           true,           true )
DEFINE_TIME_STAT(    TIME_VulkanFrontend,                        "VulkanFrontend",                         TIME_TOTAL,                         false,         false,          true,           true )
DEFINE_TIME_STAT(      TIME_VkFe_ParseSpirV,                     "VkFeParsing",                            TIME_VulkanFrontend,                false,         false,          true,           false )
DEFINE_TIME_STAT(      TIME_VkFe_TranslateSpirV,                 "VkFeTranslation",                        TIME_VulkanFrontend,                false,         false,          true,           false )
DEFINE_TIME_STAT(      TIME_VkFe_CompileSpirV,                   "VkFeBackendCompilation",                 TIME_VulkanFrontend,                false,         false,          true,           false )
DEFINE_TIME_STAT(    TIME_TOTAL_Unaccounted,                     "Total Unaccounted",                      TIME_TOTAL,                         false,         true,           true,           true )

// This must be the last one in the list
DEFINE_TIME_STAT( MAX_COMPILE_TIME_INTERVALS,                    "",                                       MAX_COMPILE_TIME_INTERVALS,         false,         false,          false,          false )
