mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
77 lines
2.4 KiB
C++
77 lines
2.4 KiB
C++
//===--- SIProgramInfo.h ----------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
/// \file
|
|
/// Defines struct to track resource usage for kernels and entry functions.
|
|
///
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
|
|
#define LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
|
|
|
|
namespace llvm {
|
|
|
|
/// Track resource usage for kernels / entry functions.
|
|
struct SIProgramInfo {
|
|
// Fields set in PGM_RSRC1 pm4 packet.
|
|
uint32_t VGPRBlocks = 0;
|
|
uint32_t SGPRBlocks = 0;
|
|
uint32_t Priority = 0;
|
|
uint32_t FloatMode = 0;
|
|
uint32_t Priv = 0;
|
|
uint32_t DX10Clamp = 0;
|
|
uint32_t DebugMode = 0;
|
|
uint32_t IEEEMode = 0;
|
|
uint64_t ScratchSize = 0;
|
|
|
|
uint64_t ComputePGMRSrc1 = 0;
|
|
|
|
// Fields set in PGM_RSRC2 pm4 packet.
|
|
uint32_t LDSBlocks = 0;
|
|
uint32_t ScratchBlocks = 0;
|
|
|
|
uint64_t ComputePGMRSrc2 = 0;
|
|
|
|
uint32_t NumVGPR = 0;
|
|
uint32_t NumSGPR = 0;
|
|
uint32_t LDSSize = 0;
|
|
bool FlatUsed = false;
|
|
|
|
// Number of SGPRs that meets number of waves per execution unit request.
|
|
uint32_t NumSGPRsForWavesPerEU = 0;
|
|
|
|
// Number of VGPRs that meets number of waves per execution unit request.
|
|
uint32_t NumVGPRsForWavesPerEU = 0;
|
|
|
|
// Fixed SGPR number used to hold wave scratch offset for entire kernel
|
|
// execution, or std::numeric_limits<uint16_t>::max() if the register is not
|
|
// used or not known.
|
|
uint16_t DebuggerWavefrontPrivateSegmentOffsetSGPR =
|
|
std::numeric_limits<uint16_t>::max();
|
|
|
|
// Fixed SGPR number of the first 4 SGPRs used to hold scratch V# for entire
|
|
// kernel execution, or std::numeric_limits<uint16_t>::max() if the register
|
|
// is not used or not known.
|
|
uint16_t DebuggerPrivateSegmentBufferSGPR =
|
|
std::numeric_limits<uint16_t>::max();
|
|
|
|
// Whether there is recursion, dynamic allocas, indirect calls or some other
|
|
// reason there may be statically unknown stack usage.
|
|
bool DynamicCallStack = false;
|
|
|
|
// Bonus information for debugging.
|
|
bool VCCUsed = false;
|
|
|
|
SIProgramInfo() = default;
|
|
};
|
|
|
|
} // namespace llvm
|
|
|
|
#endif // LLVM_LIB_TARGET_AMDGPU_SIPROGRAMINFO_H
|