9 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUARGUMENTUSAGEINFO_H 10 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUARGUMENTUSAGEINFO_H 23 class TargetRegisterClass;
24 class TargetRegisterInfo;
44 bool IsStack =
false,
bool IsSet =
false)
45 :
Reg(Val), Mask(Mask), IsStack(IsStack), IsSet(IsSet) {}
63 explicit operator bool()
const {
100 PRIVATE_SEGMENT_BUFFER = 0,
103 KERNARG_SEGMENT_PTR = 3,
105 FLAT_SCRATCH_INIT = 5,
109 PRIVATE_SEGMENT_WAVE_BYTE_OFFSET = 14,
110 IMPLICIT_BUFFER_PTR = 15,
111 IMPLICIT_ARG_PTR = 16,
117 FIRST_VGPR_VALUE = WORKITEM_ID_X
151 std::pair<const ArgDescriptor *, const TargetRegisterClass *>
169 bool doInitialization(
Module &M)
override;
170 bool doFinalization(
Module &M)
override;
175 ArgInfoMap[&
F] = ArgInfo;
179 auto I = ArgInfoMap.
find(&F);
180 if (
I == ArgInfoMap.
end()) {
182 return ExternFunctionInfo;
ArgDescriptor DispatchPtr
void setFuncArgInfo(const Function &F, const AMDGPUFunctionArgInfo &ArgInfo)
Register getRegister() const
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()
static ArgDescriptor createRegister(Register Reg, unsigned Mask=~0u)
ArgDescriptor WorkGroupIDY
ArgDescriptor WorkGroupIDZ
ArgDescriptor PrivateSegmentWaveByteOffset
static ArgDescriptor createArg(const ArgDescriptor &Arg, unsigned Mask)
iterator find(const_arg_type_t< KeyT > Val)
Represent the analysis usage information of a pass.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
static ArgDescriptor createStack(unsigned Offset, unsigned Mask=~0u)
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...
ArgDescriptor(unsigned Val=0, unsigned Mask=~0u, bool IsStack=false, bool IsSet=false)
void setPreservesAll()
Set by analyses that do not transform their input at all.
ArgDescriptor PrivateSegmentBuffer
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...
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...
Wrapper class representing virtual and physical registers.