LLVM 17.0.0git
SIProgramInfo.h
Go to the documentation of this file.
1//===--- SIProgramInfo.h ----------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9/// \file
10/// Defines struct to track resource usage and hardware flags for kernels and
11/// entry functions.
12///
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
17#define LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
18
19#include "llvm/IR/CallingConv.h"
20#include <cstdint>
21
22namespace llvm {
23
24/// Track resource usage for kernels / entry functions.
26 // Fields set in PGM_RSRC1 pm4 packet.
35 uint32_t WgpMode = 0; // GFX10+
36 uint32_t MemOrdered = 0; // GFX10+
38
39 // Fields set in PGM_RSRC2 pm4 packet.
42
45
52 unsigned SGPRSpill = 0;
53 unsigned VGPRSpill = 0;
55 bool FlatUsed = false;
56
57 // Number of SGPRs that meets number of waves per execution unit request.
59
60 // Number of VGPRs that meets number of waves per execution unit request.
62
63 // Final occupancy.
65
66 // Whether there is recursion, dynamic allocas, indirect calls or some other
67 // reason there may be statically unknown stack usage.
68 bool DynamicCallStack = false;
69
70 // Bonus information for debugging.
71 bool VCCUsed = false;
72
73 SIProgramInfo() = default;
74
75 /// Compute the value of the ComputePGMRsrc1 register.
78};
79
80} // namespace llvm
81
82#endif // LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Track resource usage for kernels / entry functions.
Definition: SIProgramInfo.h:25
uint64_t getPGMRSrc1(CallingConv::ID CC) const
uint64_t ComputePGMRSrc2
Definition: SIProgramInfo.h:43
uint32_t NumSGPRsForWavesPerEU
Definition: SIProgramInfo.h:58
SIProgramInfo()=default
uint32_t NumVGPRsForWavesPerEU
Definition: SIProgramInfo.h:61
uint64_t ComputePGMRSrc3GFX90A
Definition: SIProgramInfo.h:44
uint64_t getComputePGMRSrc1() const
Compute the value of the ComputePGMRsrc1 register.