LLVM  14.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:800
S_00B028_MEM_ORDERED
#define S_00B028_MEM_ORDERED(x)
Definition: SIDefines.h:779
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
Reg
unsigned Reg
Definition: MachineSink.cpp:1566
S_00B848_PRIV
#define S_00B848_PRIV(x)
Definition: SIDefines.h:862
llvm::CallingConv::AMDGPU_HS
@ AMDGPU_HS
Calling convention used for Mesa/AMDPAL hull shaders (= tessellation control shaders).
Definition: CallingConv.h:223
llvm::SIProgramInfo::WgpMode
uint32_t WgpMode
Definition: SIProgramInfo.h:35
llvm::SIProgramInfo::Priv
uint32_t Priv
Definition: SIProgramInfo.h:31
llvm::SIProgramInfo::MemOrdered
uint32_t MemOrdered
Definition: SIProgramInfo.h:36
S_00B848_MEM_ORDERED
#define S_00B848_MEM_ORDERED(x)
Definition: SIDefines.h:877
SIProgramInfo.h
llvm::CallingConv::AMDGPU_GS
@ AMDGPU_GS
Calling convention used for Mesa/AMDPAL geometry shaders.
Definition: CallingConv.h:207
S_00B228_MEM_ORDERED
#define S_00B228_MEM_ORDERED(x)
Definition: SIDefines.h:794
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:859
S_00B848_DX10_CLAMP
#define S_00B848_DX10_CLAMP(x)
Definition: SIDefines.h:865
S_00B848_IEEE_MODE
#define S_00B848_IEEE_MODE(x)
Definition: SIDefines.h:871
llvm::SIProgramInfo::FloatMode
uint32_t FloatMode
Definition: SIProgramInfo.h:30
uint64_t
llvm::CallingConv::AMDGPU_VS
@ AMDGPU_VS
Calling convention used for Mesa vertex shaders, or AMDPAL last shader stage before rasterization (ve...
Definition: CallingConv.h:204
llvm::SIProgramInfo::DebugMode
uint32_t DebugMode
Definition: SIProgramInfo.h:33
S_00B848_PRIORITY
#define S_00B848_PRIORITY(x)
Definition: SIDefines.h:856
S_00B848_SGPRS
#define S_00B848_SGPRS(x)
Definition: SIDefines.h:853
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:1377
S_00B428_MEM_ORDERED
#define S_00B428_MEM_ORDERED(x)
Definition: SIDefines.h:803
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:786
S_00B848_VGPRS
#define S_00B848_VGPRS(x)
Definition: SIDefines.h:850
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:868
llvm::SIProgramInfo::Priority
uint32_t Priority
Definition: SIProgramInfo.h:29
llvm::SIProgramInfo::DX10Clamp
uint32_t DX10Clamp
Definition: SIProgramInfo.h:32
S_00B848_WGP_MODE
#define S_00B848_WGP_MODE(x)
Definition: SIDefines.h:874
llvm::SIProgramInfo::SGPRBlocks
uint32_t SGPRBlocks
Definition: SIProgramInfo.h:28
llvm::CallingConv::AMDGPU_PS
@ AMDGPU_PS
Calling convention used for Mesa/AMDPAL pixel shaders.
Definition: CallingConv.h:210
S_00B228_WGP_MODE
#define S_00B228_WGP_MODE(x)
Definition: SIDefines.h:791
AMDGPUBaseInfo.h