LLVM  16.0.0git
SIProgramInfo.cpp
Go to the documentation of this file.
1 //===-- SIProgramInfo.cpp ----------------------------------------------===//
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 ///
11 /// The SIProgramInfo tracks resource usage and hardware flags for kernels and
12 /// entry functions.
13 //
14 //===----------------------------------------------------------------------===//
15 //
16 
17 #include "SIProgramInfo.h"
18 #include "SIDefines.h"
19 #include "Utils/AMDGPUBaseInfo.h"
20 
21 using namespace llvm;
22 
29 }
30 
32  if (AMDGPU::isCompute(CC)) {
33  return getComputePGMRSrc1();
34  }
39  switch (CC) {
42  break;
45  break;
48  break;
51  break;
52  default:
53  break;
54  }
55  return Reg;
56 }
S_00B428_WGP_MODE
#define S_00B428_WGP_MODE(x)
Definition: SIDefines.h:934
S_00B028_MEM_ORDERED
#define S_00B028_MEM_ORDERED(x)
Definition: SIDefines.h:913
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
S_00B848_PRIV
#define S_00B848_PRIV(x)
Definition: SIDefines.h:996
llvm::SIProgramInfo::WgpMode
uint32_t WgpMode
Definition: SIProgramInfo.h:35
llvm::X86Disassembler::Reg
Reg
All possible values of the reg field in the ModR/M byte.
Definition: X86DisassemblerDecoder.h:462
llvm::CallingConv::AMDGPU_GS
@ AMDGPU_GS
Used for Mesa/AMDPAL geometry shaders.
Definition: CallingConv.h:192
llvm::SIProgramInfo::Priv
uint32_t Priv
Definition: SIProgramInfo.h:31
llvm::CallingConv::AMDGPU_HS
@ AMDGPU_HS
Used for Mesa/AMDPAL hull shaders (= tessellation control shaders).
Definition: CallingConv.h:207
llvm::SIProgramInfo::MemOrdered
uint32_t MemOrdered
Definition: SIProgramInfo.h:36
S_00B848_MEM_ORDERED
#define S_00B848_MEM_ORDERED(x)
Definition: SIDefines.h:1011
SIProgramInfo.h
S_00B228_MEM_ORDERED
#define S_00B228_MEM_ORDERED(x)
Definition: SIDefines.h:928
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
S_00B848_FLOAT_MODE
#define S_00B848_FLOAT_MODE(x)
Definition: SIDefines.h:993
S_00B848_DX10_CLAMP
#define S_00B848_DX10_CLAMP(x)
Definition: SIDefines.h:999
S_00B848_IEEE_MODE
#define S_00B848_IEEE_MODE(x)
Definition: SIDefines.h:1005
llvm::SIProgramInfo::FloatMode
uint32_t FloatMode
Definition: SIProgramInfo.h:30
uint64_t
llvm::SIProgramInfo::DebugMode
uint32_t DebugMode
Definition: SIProgramInfo.h:33
S_00B848_PRIORITY
#define S_00B848_PRIORITY(x)
Definition: SIDefines.h:990
S_00B848_SGPRS
#define S_00B848_SGPRS(x)
Definition: SIDefines.h:987
llvm::CallingConv::AMDGPU_VS
@ AMDGPU_VS
Used for Mesa vertex shaders, or AMDPAL last shader stage before rasterization (vertex shader if tess...
Definition: CallingConv.h:189
llvm::SIProgramInfo::VGPRBlocks
uint32_t VGPRBlocks
Definition: SIProgramInfo.h:27
llvm::SIProgramInfo::getPGMRSrc1
uint64_t getPGMRSrc1(CallingConv::ID CC) const
Definition: SIProgramInfo.cpp:31
llvm::AMDGPU::isCompute
bool isCompute(CallingConv::ID cc)
Definition: AMDGPUBaseInfo.cpp:1683
S_00B428_MEM_ORDERED
#define S_00B428_MEM_ORDERED(x)
Definition: SIDefines.h:937
llvm::SIProgramInfo::IEEEMode
uint32_t IEEEMode
Definition: SIProgramInfo.h:34
SIDefines.h
S_00B128_MEM_ORDERED
#define S_00B128_MEM_ORDERED(x)
Definition: SIDefines.h:920
S_00B848_VGPRS
#define S_00B848_VGPRS(x)
Definition: SIDefines.h:984
llvm::SIProgramInfo::getComputePGMRSrc1
uint64_t getComputePGMRSrc1() const
Compute the value of the ComputePGMRsrc1 register.
Definition: SIProgramInfo.cpp:23
S_00B848_DEBUG_MODE
#define S_00B848_DEBUG_MODE(x)
Definition: SIDefines.h:1002
llvm::SIProgramInfo::Priority
uint32_t Priority
Definition: SIProgramInfo.h:29
llvm::SIProgramInfo::DX10Clamp
uint32_t DX10Clamp
Definition: SIProgramInfo.h:32
llvm::CallingConv::AMDGPU_PS
@ AMDGPU_PS
Used for Mesa/AMDPAL pixel shaders.
Definition: CallingConv.h:195
S_00B848_WGP_MODE
#define S_00B848_WGP_MODE(x)
Definition: SIDefines.h:1008
llvm::SIProgramInfo::SGPRBlocks
uint32_t SGPRBlocks
Definition: SIProgramInfo.h:28
S_00B228_WGP_MODE
#define S_00B228_WGP_MODE(x)
Definition: SIDefines.h:925
AMDGPUBaseInfo.h