Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/AMDGPU/AMDGPUMIRFormatter.cpp
Show All 17 Lines | |||||
using namespace llvm; | using namespace llvm; | ||||
bool AMDGPUMIRFormatter::parseCustomPseudoSourceValue( | bool AMDGPUMIRFormatter::parseCustomPseudoSourceValue( | ||||
StringRef Src, MachineFunction &MF, PerFunctionMIParsingState &PFS, | StringRef Src, MachineFunction &MF, PerFunctionMIParsingState &PFS, | ||||
const PseudoSourceValue *&PSV, ErrorCallbackType ErrorCallback) const { | const PseudoSourceValue *&PSV, ErrorCallbackType ErrorCallback) const { | ||||
SIMachineFunctionInfo *MFI = MF.getInfo<SIMachineFunctionInfo>(); | SIMachineFunctionInfo *MFI = MF.getInfo<SIMachineFunctionInfo>(); | ||||
const AMDGPUTargetMachine &TM = | const AMDGPUTargetMachine &TM = | ||||
static_cast<const AMDGPUTargetMachine &>(MF.getTarget()); | static_cast<const AMDGPUTargetMachine &>(MF.getTarget()); | ||||
if (Src == "ImageResource") { | |||||
PSV = MFI->getImagePSV(TM); | |||||
return false; | |||||
} | |||||
if (Src == "GWSResource") { | if (Src == "GWSResource") { | ||||
PSV = MFI->getGWSPSV(TM); | PSV = MFI->getGWSPSV(TM); | ||||
return false; | return false; | ||||
} | } | ||||
llvm_unreachable("unknown MIR custom pseudo source value"); | llvm_unreachable("unknown MIR custom pseudo source value"); | ||||
} | } |