10 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUARGUMENTUSAGEINFO_H 11 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUARGUMENTUSAGEINFO_H 23 class TargetRegisterClass;
24 class TargetRegisterInfo;
39 ArgDescriptor(
unsigned Val = 0,
bool IsStack =
false,
bool IsSet =
false)
40 :
Register(Val), IsStack(IsStack), IsSet(IsSet) {}
54 explicit operator bool()
const {
83 PRIVATE_SEGMENT_BUFFER = 0,
86 KERNARG_SEGMENT_PTR = 3,
88 FLAT_SCRATCH_INIT = 5,
92 PRIVATE_SEGMENT_WAVE_BYTE_OFFSET = 14,
93 IMPLICIT_BUFFER_PTR = 15,
94 IMPLICIT_ARG_PTR = 16,
100 FIRST_VGPR_VALUE = WORKITEM_ID_X
134 std::pair<const ArgDescriptor *, const TargetRegisterClass *>
152 bool doInitialization(
Module &M)
override;
153 bool doFinalization(
Module &M)
override;
158 ArgInfoMap[&
F] = ArgInfo;
162 auto I = ArgInfoMap.
find(&F);
163 if (
I == ArgInfoMap.
end()) {
165 return ExternFunctionInfo;
ArgDescriptor DispatchPtr
void setFuncArgInfo(const Function &F, const AMDGPUFunctionArgInfo &ArgInfo)
ArgDescriptor WorkGroupInfo
ArgDescriptor WorkItemIDZ
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
ArgDescriptor PrivateSegmentSize
ArgDescriptor WorkItemIDX
ArgDescriptor WorkItemIDY
ArgDescriptor WorkGroupIDX
unsigned const TargetRegisterInfo * TRI
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
AMDGPUArgumentUsageInfo()
ArgDescriptor WorkGroupIDY
ArgDescriptor WorkGroupIDZ
ArgDescriptor PrivateSegmentWaveByteOffset
iterator find(const_arg_type_t< KeyT > Val)
static ArgDescriptor createRegister(unsigned Reg)
Represent the analysis usage information of a pass.
const AMDGPUFunctionArgInfo & lookupFuncArgInfo(const Function &F) const
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
unsigned getStackOffset() const
ArgDescriptor ImplicitArgPtr
ImmutablePass class - This class is used to provide information that does not need to be run...
void setPreservesAll()
Set by analyses that do not transform their input at all.
ArgDescriptor PrivateSegmentBuffer
amdgpu Simplify well known AMD library false Value Value * Arg
static ArgDescriptor createStack(unsigned Reg)
ArgDescriptor KernargSegmentPtr
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
unsigned getRegister() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArgDescriptor FlatScratchInit
LLVM Value Representation.
void print(raw_ostream &OS, const TargetRegisterInfo *TRI=nullptr) const
This class implements an extremely fast bulk output stream that can only output to a stream...