Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | bool isAliased(const MachineFrameInfo *) const override { | ||||
return true; | return true; | ||||
} | } | ||||
bool mayAlias(const MachineFrameInfo *) const override { | bool mayAlias(const MachineFrameInfo *) const override { | ||||
return true; | return true; | ||||
} | } | ||||
}; | }; | ||||
class AMDGPUImagePseudoSourceValue final : public AMDGPUPseudoSourceValue { | |||||
public: | |||||
// TODO: Is the img rsrc useful? | |||||
explicit AMDGPUImagePseudoSourceValue(const AMDGPUTargetMachine &TM) | |||||
: AMDGPUPseudoSourceValue(PSVImage, TM) {} | |||||
static bool classof(const PseudoSourceValue *V) { | |||||
return V->kind() == PSVImage; | |||||
} | |||||
void printCustom(raw_ostream &OS) const override { OS << "ImageResource"; } | |||||
}; | |||||
class AMDGPUGWSResourcePseudoSourceValue final : public AMDGPUPseudoSourceValue { | class AMDGPUGWSResourcePseudoSourceValue final : public AMDGPUPseudoSourceValue { | ||||
public: | public: | ||||
explicit AMDGPUGWSResourcePseudoSourceValue(const AMDGPUTargetMachine &TM) | explicit AMDGPUGWSResourcePseudoSourceValue(const AMDGPUTargetMachine &TM) | ||||
: AMDGPUPseudoSourceValue(GWSResource, TM) {} | : AMDGPUPseudoSourceValue(GWSResource, TM) {} | ||||
static bool classof(const PseudoSourceValue *V) { | static bool classof(const PseudoSourceValue *V) { | ||||
return V->kind() == GWSResource; | return V->kind() == GWSResource; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | class SIMachineFunctionInfo final : public AMDGPUMachineFunction { | ||||
// A pair of default/requested minimum/maximum flat work group sizes. | // A pair of default/requested minimum/maximum flat work group sizes. | ||||
// Minimum - first, maximum - second. | // Minimum - first, maximum - second. | ||||
std::pair<unsigned, unsigned> FlatWorkGroupSizes = {0, 0}; | std::pair<unsigned, unsigned> FlatWorkGroupSizes = {0, 0}; | ||||
// A pair of default/requested minimum/maximum number of waves per execution | // A pair of default/requested minimum/maximum number of waves per execution | ||||
// unit. Minimum - first, maximum - second. | // unit. Minimum - first, maximum - second. | ||||
std::pair<unsigned, unsigned> WavesPerEU = {0, 0}; | std::pair<unsigned, unsigned> WavesPerEU = {0, 0}; | ||||
const AMDGPUImagePseudoSourceValue ImagePSV; | |||||
const AMDGPUGWSResourcePseudoSourceValue GWSResourcePSV; | const AMDGPUGWSResourcePseudoSourceValue GWSResourcePSV; | ||||
foad: Are you planning to remove GWSResourcePSV too? | |||||
No. That's simply because I haven't thought enough about it, don't really have the time, and it feels like enough of a rare and specialized corner that it's fine to leave it as-is. I also wouldn't want to commit to clearing out all mention of PSV's from the backend just yet. @arsenm may want to weigh in more. nhaehnle: No. That's simply because I haven't thought enough about it, don't really have the time, and it… | |||||
private: | private: | ||||
unsigned NumUserSGPRs = 0; | unsigned NumUserSGPRs = 0; | ||||
unsigned NumSystemSGPRs = 0; | unsigned NumSystemSGPRs = 0; | ||||
bool HasSpilledSGPRs = false; | bool HasSpilledSGPRs = false; | ||||
bool HasSpilledVGPRs = false; | bool HasSpilledVGPRs = false; | ||||
bool HasNonSpillStackObjects = false; | bool HasNonSpillStackObjects = false; | ||||
▲ Show 20 Lines • Show All 534 Lines • ▼ Show 20 Lines | case 1: | ||||
return ArgInfo.WorkGroupIDY.getRegister(); | return ArgInfo.WorkGroupIDY.getRegister(); | ||||
case 2: | case 2: | ||||
assert(hasWorkGroupIDZ()); | assert(hasWorkGroupIDZ()); | ||||
return ArgInfo.WorkGroupIDZ.getRegister(); | return ArgInfo.WorkGroupIDZ.getRegister(); | ||||
} | } | ||||
llvm_unreachable("unexpected dimension"); | llvm_unreachable("unexpected dimension"); | ||||
} | } | ||||
const AMDGPUImagePseudoSourceValue * | |||||
getImagePSV(const AMDGPUTargetMachine &TM) { | |||||
return &ImagePSV; | |||||
} | |||||
const AMDGPUGWSResourcePseudoSourceValue * | const AMDGPUGWSResourcePseudoSourceValue * | ||||
getGWSPSV(const AMDGPUTargetMachine &TM) { | getGWSPSV(const AMDGPUTargetMachine &TM) { | ||||
return &GWSResourcePSV; | return &GWSResourcePSV; | ||||
} | } | ||||
unsigned getOccupancy() const { | unsigned getOccupancy() const { | ||||
return Occupancy; | return Occupancy; | ||||
} | } | ||||
Show All 35 Lines |
Are you planning to remove GWSResourcePSV too?