1 /*========================== begin_copyright_notice ============================ 2 3 Copyright (C) 2017-2021 Intel Corporation 4 5 SPDX-License-Identifier: MIT 6 7 ============================= end_copyright_notice ===========================*/ 8 9 #ifndef JITTERDATASTRUCT_ 10 #define JITTERDATASTRUCT_ 11 12 #include <stdint.h> 13 14 typedef struct _VISA_BB_INFO{ 15 int id; 16 unsigned staticCycle; 17 unsigned sendStallCycle; 18 unsigned char loopNestLevel; 19 } VISA_BB_INFO; 20 21 typedef struct _FINALIZER_INFO{ 22 // Common part 23 bool isSpill; 24 int numGRFUsed; 25 int numAsmCount; 26 27 // spillMemUsed is the scratch size in byte of entire vISA stack for this function/kernel 28 // It contains spill size and caller/callee save size. 29 unsigned int spillMemUsed = 0; 30 31 // Debug info is callee allocated 32 // and populated only if 33 // switch is passed to JIT to emit 34 // debug info. 35 void* genDebugInfo; 36 unsigned int genDebugInfoSize; 37 38 // Number of flag spill and fill. 39 unsigned numFlagSpillStore; 40 unsigned numFlagSpillLoad; 41 42 // whether kernel uses a barrier 43 unsigned usesBarrier; 44 45 unsigned BBNum; 46 VISA_BB_INFO* BBInfo; 47 48 // number of spill/fill, weighted by loop 49 unsigned int numGRFSpillFill; 50 // whether kernel recompilation should be avoided 51 bool avoidRetry = false; 52 53 void* freeGRFInfo; 54 unsigned int freeGRFInfoSize; 55 unsigned char numBytesScratchGtpin; 56 57 uint32_t offsetToSkipPerThreadDataLoad = 0; 58 uint32_t offsetToSkipCrossThreadDataLoad = 0; 59 60 // When two entries prolog is added for setting FFID 61 // for compute (GP or GP1), skip this offset to set FFID_GP1. 62 // Will set FFID_GP if not skip 63 uint32_t offsetToSkipSetFFIDGP = 0; 64 uint32_t offsetToSkipSetFFIDGP1 = 0; 65 66 bool hasStackcalls = false; 67 68 uint32_t numGRFTotal = 0; 69 uint32_t numThreads = 0; 70 71 } FINALIZER_INFO; 72 73 #endif // JITTERDATASTRUCT_ 74