LLVM 17.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"
20
21using 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}
#define S_00B428_MEM_ORDERED(x)
Definition: SIDefines.h:951
#define S_00B028_MEM_ORDERED(x)
Definition: SIDefines.h:927
#define S_00B228_WGP_MODE(x)
Definition: SIDefines.h:939
#define S_00B848_MEM_ORDERED(x)
Definition: SIDefines.h:1025
#define S_00B228_MEM_ORDERED(x)
Definition: SIDefines.h:942
#define S_00B848_DEBUG_MODE(x)
Definition: SIDefines.h:1016
#define S_00B428_WGP_MODE(x)
Definition: SIDefines.h:948
#define S_00B848_PRIV(x)
Definition: SIDefines.h:1010
#define S_00B128_MEM_ORDERED(x)
Definition: SIDefines.h:934
#define S_00B848_WGP_MODE(x)
Definition: SIDefines.h:1022
#define S_00B848_SGPRS(x)
Definition: SIDefines.h:1001
#define S_00B848_DX10_CLAMP(x)
Definition: SIDefines.h:1013
#define S_00B848_VGPRS(x)
Definition: SIDefines.h:998
#define S_00B848_PRIORITY(x)
Definition: SIDefines.h:1004
#define S_00B848_IEEE_MODE(x)
Definition: SIDefines.h:1019
#define S_00B848_FLOAT_MODE(x)
Definition: SIDefines.h:1007
Defines struct to track resource usage and hardware flags for kernels and entry functions.
bool isCompute(CallingConv::ID cc)
@ AMDGPU_VS
Used for Mesa vertex shaders, or AMDPAL last shader stage before rasterization (vertex shader if tess...
Definition: CallingConv.h:185
@ AMDGPU_HS
Used for Mesa/AMDPAL hull shaders (= tessellation control shaders).
Definition: CallingConv.h:203
@ AMDGPU_GS
Used for Mesa/AMDPAL geometry shaders.
Definition: CallingConv.h:188
@ AMDGPU_PS
Used for Mesa/AMDPAL pixel shaders.
Definition: CallingConv.h:191
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
uint64_t getPGMRSrc1(CallingConv::ID CC) const
uint64_t getComputePGMRSrc1() const
Compute the value of the ComputePGMRsrc1 register.