aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/SIProgramInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIProgramInfo.h')
-rw-r--r--llvm/lib/Target/AMDGPU/SIProgramInfo.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIProgramInfo.h b/llvm/lib/Target/AMDGPU/SIProgramInfo.h
index 7c039a54b57f..9b72d0829d80 100644
--- a/llvm/lib/Target/AMDGPU/SIProgramInfo.h
+++ b/llvm/lib/Target/AMDGPU/SIProgramInfo.h
@@ -7,7 +7,8 @@
//===----------------------------------------------------------------------===//
//
/// \file
-/// Defines struct to track resource usage for kernels and entry functions.
+/// Defines struct to track resource usage and hardware flags for kernels and
+/// entry functions.
///
//
//===----------------------------------------------------------------------===//
@@ -15,6 +16,9 @@
#ifndef LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
#define LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
+#include "llvm/IR/CallingConv.h"
+#include <cstdint>
+
namespace llvm {
/// Track resource usage for kernels / entry functions.
@@ -32,8 +36,6 @@ struct SIProgramInfo {
uint32_t MemOrdered = 0; // GFX10+
uint64_t ScratchSize = 0;
- uint64_t ComputePGMRSrc1 = 0;
-
// Fields set in PGM_RSRC2 pm4 packet.
uint32_t LDSBlocks = 0;
uint32_t ScratchBlocks = 0;
@@ -64,6 +66,10 @@ struct SIProgramInfo {
bool VCCUsed = false;
SIProgramInfo() = default;
+
+ /// Compute the value of the ComputePGMRsrc1 register.
+ uint64_t getComputePGMRSrc1() const;
+ uint64_t getPGMRSrc1(CallingConv::ID CC) const;
};
} // namespace llvm