LLVM  8.0.1
SIProgramInfo.h
Go to the documentation of this file.
1 //===--- SIProgramInfo.h ----------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 /// \file
11 /// Defines struct to track resource usage for kernels and entry functions.
12 ///
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
17 #define LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
18 
19 namespace llvm {
20 
21 /// Track resource usage for kernels / entry functions.
22 struct SIProgramInfo {
23  // Fields set in PGM_RSRC1 pm4 packet.
32  uint64_t ScratchSize = 0;
33 
34  uint64_t ComputePGMRSrc1 = 0;
35 
36  // Fields set in PGM_RSRC2 pm4 packet.
39 
40  uint64_t ComputePGMRSrc2 = 0;
41 
45  bool FlatUsed = false;
46 
47  // Number of SGPRs that meets number of waves per execution unit request.
49 
50  // Number of VGPRs that meets number of waves per execution unit request.
52 
53  // Fixed SGPR number used to hold wave scratch offset for entire kernel
54  // execution, or std::numeric_limits<uint16_t>::max() if the register is not
55  // used or not known.
58 
59  // Fixed SGPR number of the first 4 SGPRs used to hold scratch V# for entire
60  // kernel execution, or std::numeric_limits<uint16_t>::max() if the register
61  // is not used or not known.
64 
65  // Whether there is recursion, dynamic allocas, indirect calls or some other
66  // reason there may be statically unknown stack usage.
67  bool DynamicCallStack = false;
68 
69  // Bonus information for debugging.
70  bool VCCUsed = false;
71 
72  SIProgramInfo() = default;
73 };
74 
75 } // namespace llvm
76 
77 #endif // LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
uint16_t DebuggerPrivateSegmentBufferSGPR
Definition: SIProgramInfo.h:62
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
This class represents lattice values for constants.
Definition: AllocatorList.h:24
uint32_t NumSGPRsForWavesPerEU
Definition: SIProgramInfo.h:48
Track resource usage for kernels / entry functions.
Definition: SIProgramInfo.h:22
uint16_t DebuggerWavefrontPrivateSegmentOffsetSGPR
Definition: SIProgramInfo.h:56
uint64_t ComputePGMRSrc2
Definition: SIProgramInfo.h:40
uint32_t NumVGPRsForWavesPerEU
Definition: SIProgramInfo.h:51
SIProgramInfo()=default
uint64_t ComputePGMRSrc1
Definition: SIProgramInfo.h:34