17 #define DEBUG_TYPE "amdgpu-argument-reg-usage-info" 20 "Argument Register Usage Information Storage",
false,
true)
30 OS <<
"Reg " <<
printReg(getRegister(), TRI) <<
'\n';
32 OS <<
"Stack offset " << getStackOffset() <<
'\n';
49 for (
const auto &FI : ArgInfoMap) {
50 OS <<
"Arguments for " << FI.first->getName() <<
'\n' 51 <<
" PrivateSegmentBuffer: " << FI.second.PrivateSegmentBuffer
52 <<
" DispatchPtr: " << FI.second.DispatchPtr
53 <<
" QueuePtr: " << FI.second.QueuePtr
54 <<
" KernargSegmentPtr: " << FI.second.KernargSegmentPtr
55 <<
" DispatchID: " << FI.second.DispatchID
56 <<
" FlatScratchInit: " << FI.second.FlatScratchInit
57 <<
" PrivateSegmentSize: " << FI.second.PrivateSegmentSize
58 <<
" WorkGroupIDX: " << FI.second.WorkGroupIDX
59 <<
" WorkGroupIDY: " << FI.second.WorkGroupIDY
60 <<
" WorkGroupIDZ: " << FI.second.WorkGroupIDZ
61 <<
" WorkGroupInfo: " << FI.second.WorkGroupInfo
62 <<
" PrivateSegmentWaveByteOffset: " 63 << FI.second.PrivateSegmentWaveByteOffset
64 <<
" ImplicitBufferPtr: " << FI.second.ImplicitBufferPtr
65 <<
" ImplicitArgPtr: " << FI.second.ImplicitArgPtr
66 <<
" WorkItemIDX " << FI.second.WorkItemIDX
67 <<
" WorkItemIDY " << FI.second.WorkItemIDY
68 <<
" WorkItemIDZ " << FI.second.WorkItemIDZ
73 std::pair<const ArgDescriptor *, const TargetRegisterClass *>
78 return std::make_pair(
79 PrivateSegmentBuffer ? &PrivateSegmentBuffer :
nullptr,
80 &AMDGPU::SGPR_128RegClass);
83 return std::make_pair(ImplicitBufferPtr ? &ImplicitBufferPtr :
nullptr,
84 &AMDGPU::SGPR_64RegClass);
86 return std::make_pair(WorkGroupIDX ? &WorkGroupIDX :
nullptr,
87 &AMDGPU::SGPR_32RegClass);
90 return std::make_pair(WorkGroupIDY ? &WorkGroupIDY :
nullptr,
91 &AMDGPU::SGPR_32RegClass);
93 return std::make_pair(WorkGroupIDZ ? &WorkGroupIDZ :
nullptr,
94 &AMDGPU::SGPR_32RegClass);
96 return std::make_pair(
97 PrivateSegmentWaveByteOffset ? &PrivateSegmentWaveByteOffset :
nullptr,
98 &AMDGPU::SGPR_32RegClass);
100 return std::make_pair(KernargSegmentPtr ? &KernargSegmentPtr :
nullptr,
101 &AMDGPU::SGPR_64RegClass);
103 return std::make_pair(ImplicitArgPtr ? &ImplicitArgPtr :
nullptr,
104 &AMDGPU::SGPR_64RegClass);
106 return std::make_pair(DispatchID ? &DispatchID :
nullptr,
107 &AMDGPU::SGPR_64RegClass);
109 return std::make_pair(FlatScratchInit ? &FlatScratchInit :
nullptr,
110 &AMDGPU::SGPR_64RegClass);
112 return std::make_pair(DispatchPtr ? &DispatchPtr :
nullptr,
113 &AMDGPU::SGPR_64RegClass);
115 return std::make_pair(QueuePtr ? &QueuePtr :
nullptr,
116 &AMDGPU::SGPR_64RegClass);
118 return std::make_pair(WorkItemIDX ? &WorkItemIDX :
nullptr,
119 &AMDGPU::VGPR_32RegClass);
121 return std::make_pair(WorkItemIDY ? &WorkItemIDY :
nullptr,
122 &AMDGPU::VGPR_32RegClass);
124 return std::make_pair(WorkItemIDZ ? &WorkItemIDZ :
nullptr,
125 &AMDGPU::VGPR_32RegClass);
void print(raw_ostream &OS, const Module *M=nullptr) const override
print - Print out the internal state of the pass.
Interface definition for SIRegisterInfo.
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
unsigned const TargetRegisterInfo * TRI
Printable printReg(unsigned Reg, const TargetRegisterInfo *TRI=nullptr, unsigned SubIdx=0, const MachineRegisterInfo *MRI=nullptr)
Prints virtual and physical registers with or without a TRI instance.
bool doInitialization(Module &M) override
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
std::pair< const ArgDescriptor *, const TargetRegisterClass * > getPreloadedValue(PreloadedValue Value) const
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream...
bool doFinalization(Module &M) override
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...