LLVM 20.0.0git
|
#include "Target/SPIRV/SPIRVGlobalRegistry.h"
Public Attributes | |
MachineFunction * | CurMF |
Definition at line 30 of file SPIRVGlobalRegistry.h.
SPIRVGlobalRegistry::SPIRVGlobalRegistry | ( | unsigned | PointerSize | ) |
Definition at line 30 of file SPIRVGlobalRegistry.cpp.
|
inline |
Definition at line 117 of file SPIRVGlobalRegistry.h.
References llvm::SPIRVGeneralDuplicatesTracker::add().
|
inline |
Definition at line 105 of file SPIRVGlobalRegistry.h.
References llvm::SPIRVGeneralDuplicatesTracker::add(), and llvm::CallingConv::C.
Referenced by addConstantsToTrack(), generateAssignInstrs(), insertInlineAsmProcess(), and llvm::SPIRVCallLowering::lowerFormalArguments().
|
inline |
Definition at line 113 of file SPIRVGlobalRegistry.h.
References llvm::SPIRVGeneralDuplicatesTracker::add(), and F.
|
inline |
Definition at line 109 of file SPIRVGlobalRegistry.h.
References llvm::SPIRVGeneralDuplicatesTracker::add().
|
inline |
Definition at line 121 of file SPIRVGlobalRegistry.h.
References llvm::SPIRVGeneralDuplicatesTracker::add(), and MI.
|
inline |
Definition at line 161 of file SPIRVGlobalRegistry.h.
Definition at line 189 of file SPIRVGlobalRegistry.h.
Definition at line 182 of file SPIRVGlobalRegistry.h.
|
inline |
Definition at line 257 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), F, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and MI.
Referenced by llvm::SPIRVTargetLowering::finalizeLowering().
Definition at line 173 of file SPIRVGlobalRegistry.h.
|
inline |
Definition at line 150 of file SPIRVGlobalRegistry.h.
Referenced by llvm::SPIRVCallLowering::lowerFormalArguments().
SPIRVType * SPIRVGlobalRegistry::assignFloatTypeToVReg | ( | unsigned | BitWidth, |
Register | VReg, | ||
MachineInstr & | I, | ||
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 43 of file SPIRVGlobalRegistry.cpp.
References assignSPIRVTypeToVReg(), llvm::BitWidth, CurMF, getOrCreateSPIRVFloatType(), I, and TII.
SPIRVType * SPIRVGlobalRegistry::assignIntTypeToVReg | ( | unsigned | BitWidth, |
Register | VReg, | ||
MachineInstr & | I, | ||
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 33 of file SPIRVGlobalRegistry.cpp.
References assignSPIRVTypeToVReg(), llvm::BitWidth, CurMF, getOrCreateSPIRVIntegerType(), I, and TII.
void SPIRVGlobalRegistry::assignSPIRVTypeToVReg | ( | SPIRVType * | Type, |
Register | VReg, | ||
MachineFunction & | MF | ||
) |
Definition at line 69 of file SPIRVGlobalRegistry.cpp.
Referenced by assignFloatTypeToVReg(), assignIntTypeToVReg(), assignTypeToVReg(), assignVectTypeToVReg(), llvm::buildAtomicCompareExchangeInst(), llvm::buildAtomicRMWInst(), llvm::buildBoolRegister(), llvm::buildBuiltinVariableLoad(), buildConstantFP(), llvm::buildEnqueueKernel(), buildGlobalVariable(), llvm::buildLoadInst(), llvm::buildNDRange(), convertPtrToInt(), doInsertBitcast(), llvm::generateGroupInst(), llvm::generateImageSizeQueryInst(), llvm::generateReadImageInst(), llvm::genWorkgroupQuery(), getOrCreateConstNullPtr(), getOrCreateUndef(), llvm::insertAssignInstr(), insertBitcasts(), insertInlineAsmProcess(), llvm::SPIRVCallLowering::lowerCall(), llvm::SPIRVCallLowering::lowerFormalArguments(), processNewInstrs(), and propagateSPIRVType().
SPIRVType * SPIRVGlobalRegistry::assignTypeToVReg | ( | const Type * | Type, |
Register | VReg, | ||
MachineIRBuilder & | MIRBuilder, | ||
SPIRV::AccessQualifier::AccessQualifier | AQ = SPIRV::AccessQualifier::ReadWrite , |
||
bool | EmitIR = true |
||
) |
Definition at line 60 of file SPIRVGlobalRegistry.cpp.
References assignSPIRVTypeToVReg(), llvm::MachineIRBuilder::getMF(), and getOrCreateSPIRVType().
Referenced by buildConstantInt(), llvm::SPIRV::lowerBuiltin(), and llvm::SPIRVCallLowering::lowerCall().
SPIRVType * SPIRVGlobalRegistry::assignVectTypeToVReg | ( | SPIRVType * | BaseType, |
unsigned | NumElements, | ||
Register | VReg, | ||
MachineInstr & | I, | ||
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 51 of file SPIRVGlobalRegistry.cpp.
References assignSPIRVTypeToVReg(), CurMF, getOrCreateSPIRVVectorType(), I, and TII.
Register SPIRVGlobalRegistry::buildConstantFP | ( | APFloat | Val, |
MachineIRBuilder & | MIRBuilder, | ||
SPIRVType * | SpvType = nullptr |
||
) |
Definition at line 343 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::addNumImm(), llvm::MachineInstrBuilder::addUse(), assignSPIRVTypeToVReg(), llvm::MachineIRBuilder::buildInstr(), llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::Type::getFloatTy(), llvm::MachineIRBuilder::getMF(), getOrCreateSPIRVType(), getSPIRVTypeID(), llvm::Register::isValid(), and llvm::LLT::scalar().
Referenced by llvm::generateReadImageInst().
Register SPIRVGlobalRegistry::buildConstantInt | ( | uint64_t | Val, |
MachineIRBuilder & | MIRBuilder, | ||
SPIRVType * | SpvType = nullptr , |
||
bool | EmitIR = true |
||
) |
Definition at line 296 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::addNumImm(), llvm::MachineInstrBuilder::addUse(), assignTypeToVReg(), llvm::BitWidth, llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildInstr(), llvm::constrainSelectedInstRegOperands(), CurMF, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::Type::getInt32Ty(), llvm::MachineIRBuilder::getMF(), getOrCreateSPIRVIntegerType(), getScalarOrVectorBitWidth(), getSPIRVTypeID(), llvm::MachineFunction::getSubtarget(), getTypeForSPIRVType(), llvm::Register::isValid(), and llvm::LLT::scalar().
Referenced by llvm::buildConstantIntReg(), llvm::buildNDRange(), llvm::buildSelectInst(), llvm::generateGroupInst(), llvm::genWorkgroupQuery(), and getOrCreateOpTypeCoopMatr().
Register SPIRVGlobalRegistry::buildConstantSampler | ( | Register | Res, |
unsigned | AddrMode, | ||
unsigned | Param, | ||
unsigned | FilerMode, | ||
MachineIRBuilder & | MIRBuilder, | ||
SPIRVType * | SpvType | ||
) |
Definition at line 577 of file SPIRVGlobalRegistry.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addUse(), assert(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineIRBuilder::getMRI(), getOrCreateSPIRVType(), getOrCreateSPIRVTypeByName(), getSPIRVTypeID(), getTypeForSPIRVType(), llvm::Register::isValid(), and llvm::report_fatal_error().
Referenced by llvm::generateReadImageInst(), and llvm::generateSampleImageInst().
|
inline |
Definition at line 141 of file SPIRVGlobalRegistry.h.
References llvm::SPIRVGeneralDuplicatesTracker::buildDepsGraph().
Register SPIRVGlobalRegistry::buildGlobalVariable | ( | Register | Reg, |
SPIRVType * | BaseType, | ||
StringRef | Name, | ||
const GlobalValue * | GV, | ||
SPIRV::StorageClass::StorageClass | Storage, | ||
const MachineInstr * | Init, | ||
bool | IsConst, | ||
bool | HasLinkageTy, | ||
SPIRV::LinkageType::LinkageType | LinkageType, | ||
MachineIRBuilder & | MIRBuilder, | ||
bool | IsInstSelector | ||
) |
Definition at line 601 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addUse(), assert(), assignSPIRVTypeToVReg(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildInstr(), llvm::buildOpDecorate(), llvm::buildOpName(), llvm::buildOpSpirvDecorations(), llvm::constrainSelectedInstRegOperands(), CurMF, llvm::GlobalValue::ExternalLinkage, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::GlobalObject::getAlign(), llvm::MachineFunction::getFunction(), llvm::GlobalObject::getMetadata(), llvm::MachineIRBuilder::getMF(), llvm::MachineIRBuilder::getMRI(), llvm::Value::getName(), llvm::MachineInstr::getOperand(), llvm::GlobalValue::getParent(), getPointerSize(), llvm::MachineOperand::getReg(), llvm::getSpirvBuiltInIdByName(), getSPIRVTypeForVReg(), getSPIRVTypeID(), llvm::MachineFunction::getSubtarget(), getTypeForSPIRVType(), llvm::Value::hasName(), MRI, Name, llvm::LLT::pointer(), llvm::Align::value(), and llvm::MaybeAlign::valueOrOne().
Referenced by llvm::buildBuiltinVariableLoad().
|
inline |
Definition at line 129 of file SPIRVGlobalRegistry.h.
References llvm::CallingConv::C, and llvm::SPIRVGeneralDuplicatesTracker::find().
|
inline |
Definition at line 137 of file SPIRVGlobalRegistry.h.
References F, and llvm::SPIRVGeneralDuplicatesTracker::find().
|
inline |
Definition at line 133 of file SPIRVGlobalRegistry.h.
References llvm::SPIRVGeneralDuplicatesTracker::find().
|
inline |
Definition at line 125 of file SPIRVGlobalRegistry.h.
References llvm::SPIRVGeneralDuplicatesTracker::find(), and MI.
Referenced by addConstantsToTrack(), generateAssignInstrs(), and llvm::SPIRVCallLowering::lowerCall().
Definition at line 165 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by reconstructType().
Definition at line 193 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by getDeducedGlobalValueType().
Definition at line 184 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by getAtomicElemTy(), getDeducedGlobalValueType(), llvm::SPIRVCallLowering::lowerFormalArguments(), and reconstructType().
Definition at line 175 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by restoreMutatedType().
|
inline |
Definition at line 154 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by llvm::SPIRVCallLowering::lowerCall().
|
inline |
Definition at line 147 of file SPIRVGlobalRegistry.h.
|
inline |
Definition at line 198 of file SPIRVGlobalRegistry.h.
References findDeducedCompositeType(), findDeducedElementType(), and llvm::Global.
Referenced by propagateSPIRVType().
|
inline |
Definition at line 267 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), F, and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by validateForwardCalls().
|
inline |
Definition at line 234 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and MI.
Referenced by validateForwardCalls().
|
inline |
Definition at line 225 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), F, and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by validateFunCall().
|
inline |
Definition at line 215 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Definition at line 1046 of file SPIRVGlobalRegistry.cpp.
References assert(), and getSPIRVTypeForVReg().
Referenced by isBitcastCompatible().
Register SPIRVGlobalRegistry::getOrCreateConsIntVector | ( | uint64_t | Val, |
MachineIRBuilder & | MIRBuilder, | ||
SPIRVType * | SpvType, | ||
bool | EmitIR = true |
||
) |
Definition at line 539 of file SPIRVGlobalRegistry.cpp.
References assert(), llvm::VectorType::getElementCount(), llvm::VectorType::getElementType(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), getScalarOrVectorBitWidth(), llvm::ConstantVector::getSplat(), getTypeForSPIRVType(), and llvm::Type::isVectorTy().
Referenced by llvm::buildSelectInst().
Register SPIRVGlobalRegistry::getOrCreateConstFP | ( | APFloat | Val, |
MachineInstr & | I, | ||
SPIRVType * | SpvType, | ||
const SPIRVInstrInfo & | TII, | ||
bool | ZeroAsNull = true |
||
) |
Definition at line 228 of file SPIRVGlobalRegistry.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::addNumImm(), llvm::MachineInstrBuilder::addUse(), assert(), llvm::APFloat::bitcastToAPInt(), llvm::BitWidth, llvm::BuildMI(), llvm::constrainSelectedInstRegOperands(), CurMF, getSPIRVTypeID(), llvm::MachineFunction::getSubtarget(), llvm::ConstantFP::getValueAPF(), llvm::APInt::getZExtValue(), I, llvm::APFloat::isPosZero(), and TII.
Register SPIRVGlobalRegistry::getOrCreateConstInt | ( | uint64_t | Val, |
MachineInstr & | I, | ||
SPIRVType * | SpvType, | ||
const SPIRVInstrInfo & | TII, | ||
bool | ZeroAsNull = true |
||
) |
Definition at line 264 of file SPIRVGlobalRegistry.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::addNumImm(), llvm::MachineInstrBuilder::addUse(), assert(), llvm::BuildMI(), llvm::constrainSelectedInstRegOperands(), CurMF, getScalarOrVectorBitWidth(), getSPIRVTypeID(), llvm::MachineFunction::getSubtarget(), I, and TII.
Referenced by getOrCreateSPIRVArrayType().
Register SPIRVGlobalRegistry::getOrCreateConstIntArray | ( | uint64_t | Val, |
size_t | Num, | ||
MachineInstr & | I, | ||
SPIRVType * | SpvType, | ||
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 476 of file SPIRVGlobalRegistry.cpp.
References assert(), llvm::PoisonValue::get(), llvm::ConstantStruct::getAnon(), llvm::ArrayType::getElementType(), llvm::ArrayType::getNumElements(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), getScalarOrVectorBitWidth(), getSPIRVTypeForVReg(), getTypeForSPIRVType(), I, llvm::Type::isArrayTy(), and TII.
Referenced by llvm::buildNDRange().
Register SPIRVGlobalRegistry::getOrCreateConstNullPtr | ( | MachineIRBuilder & | MIRBuilder, |
SPIRVType * | SpvType | ||
) |
Definition at line 556 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), assignSPIRVTypeToVReg(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), CurMF, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::ConstantPointerNull::get(), llvm::PointerType::get(), llvm::TypedPointerType::getAddressSpace(), llvm::TypedPointerType::getElementType(), llvm::MachineFunction::getRegInfo(), getSPIRVTypeID(), getTypeForSPIRVType(), llvm::Register::isValid(), llvm::LLT::pointer(), and llvm::MachineRegisterInfo::setRegClass().
Referenced by llvm::buildEnqueueKernel().
Register SPIRVGlobalRegistry::getOrCreateConstVector | ( | APFloat | Val, |
MachineInstr & | I, | ||
SPIRVType * | SpvType, | ||
const SPIRVInstrInfo & | TII, | ||
bool | ZeroAsNull = true |
||
) |
Definition at line 457 of file SPIRVGlobalRegistry.cpp.
References assert(), llvm::VectorType::getElementCount(), llvm::VectorType::getElementType(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), getScalarOrVectorBitWidth(), llvm::ConstantVector::getSplat(), getTypeForSPIRVType(), I, llvm::Type::isFloatingPointTy(), llvm::Type::isVectorTy(), and TII.
Register SPIRVGlobalRegistry::getOrCreateConstVector | ( | uint64_t | Val, |
MachineInstr & | I, | ||
SPIRVType * | SpvType, | ||
const SPIRVInstrInfo & | TII, | ||
bool | ZeroAsNull = true |
||
) |
Definition at line 438 of file SPIRVGlobalRegistry.cpp.
References assert(), llvm::VectorType::getElementCount(), llvm::VectorType::getElementType(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), getScalarOrVectorBitWidth(), llvm::ConstantVector::getSplat(), getTypeForSPIRVType(), I, llvm::Type::isIntegerTy(), llvm::Type::isVectorTy(), and TII.
SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeByOpcode | ( | const Type * | Ty, |
MachineIRBuilder & | MIRBuilder, | ||
unsigned | Opcode | ||
) |
Definition at line 1203 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineIRBuilder::buildInstr(), createTypeVReg(), llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::MachineIRBuilder::getMF(), llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::getUniqueVRegDef(), and llvm::Register::isValid().
Referenced by llvm::getNonParameterizedType().
SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeCoopMatr | ( | MachineIRBuilder & | MIRBuilder, |
const TargetExtType * | ExtensionType, | ||
const SPIRVType * | ElemType, | ||
uint32_t | Scope, | ||
uint32_t | Rows, | ||
uint32_t | Columns, | ||
uint32_t | Use | ||
) |
Definition at line 1183 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), buildConstantInt(), llvm::MachineIRBuilder::buildInstr(), createTypeVReg(), llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::MachineIRBuilder::getMF(), llvm::MachineFunction::getRegInfo(), getSPIRVTypeID(), llvm::MachineRegisterInfo::getUniqueVRegDef(), and llvm::Register::isValid().
Referenced by llvm::getCoopMatrType().
SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeDeviceEvent | ( | MachineIRBuilder & | MIRBuilder | ) |
Definition at line 1158 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineIRBuilder::buildInstr(), createTypeVReg(), llvm::MachineIRBuilder::getMF(), and llvm::SPIRV::make_descr_event().
Referenced by llvm::SPIRV::lowerBuiltinType().
SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeFunctionWithArgs | ( | const Type * | Ty, |
SPIRVType * | RetType, | ||
const SmallVectorImpl< SPIRVType * > & | ArgTypes, | ||
MachineIRBuilder & | MIRBuilder | ||
) |
Definition at line 786 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), CurMF, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::MachineIRBuilder::getMF(), getSPIRVTypeForVReg(), and getSPIRVTypeID().
Referenced by insertInlineAsmProcess(), and llvm::SPIRVCallLowering::lowerFormalArguments().
SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeImage | ( | MachineIRBuilder & | MIRBuilder, |
SPIRVType * | SampledType, | ||
SPIRV::Dim::Dim | Dim, | ||
uint32_t | Depth, | ||
uint32_t | Arrayed, | ||
uint32_t | Multisampled, | ||
uint32_t | Sampled, | ||
SPIRV::ImageFormat::ImageFormat | ImageFormat, | ||
SPIRV::AccessQualifier::AccessQualifier | AccQual | ||
) |
Definition at line 1111 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addUse(), llvm::MachineIRBuilder::buildInstr(), createTypeVReg(), llvm::Depth, llvm::MachineIRBuilder::getMF(), getSPIRVTypeID(), and llvm::SPIRV::make_descr_image().
Referenced by llvm::getImageType().
SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypePipe | ( | MachineIRBuilder & | MIRBuilder, |
SPIRV::AccessQualifier::AccessQualifier | AccQual | ||
) |
Definition at line 1145 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineIRBuilder::buildInstr(), createTypeVReg(), llvm::MachineIRBuilder::getMF(), and llvm::SPIRV::make_descr_pipe().
Referenced by llvm::getPipeType().
SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeSampledImage | ( | SPIRVType * | ImageType, |
MachineIRBuilder & | MIRBuilder | ||
) |
Definition at line 1168 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), llvm::MachineIRBuilder::buildInstr(), createTypeVReg(), llvm::MachineIRBuilder::getMF(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), getSPIRVTypeID(), llvm::MachineRegisterInfo::getVRegDef(), and llvm::SPIRV::make_descr_sampled_image().
Referenced by llvm::generateReadImageInst(), llvm::generateSampleImageInst(), and llvm::getSampledImageType().
SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeSampler | ( | MachineIRBuilder & | MIRBuilder | ) |
Definition at line 1136 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineIRBuilder::buildInstr(), createTypeVReg(), llvm::MachineIRBuilder::getMF(), and llvm::SPIRV::make_descr_sampler().
Referenced by llvm::getSamplerType().
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVArrayType | ( | SPIRVType * | BaseType, |
unsigned | NumElements, | ||
MachineInstr & | I, | ||
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 1380 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), llvm::BuildMI(), createTypeVReg(), CurMF, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::ArrayType::get(), getOrCreateConstInt(), getOrCreateSPIRVIntegerType(), llvm::MachineFunction::getRegInfo(), getSPIRVTypeForVReg(), getSPIRVTypeID(), getTypeForSPIRVType(), I, and TII.
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVBoolType | ( | MachineInstr & | I, |
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 1342 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::BuildMI(), createTypeVReg(), CurMF, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::IntegerType::get(), llvm::Function::getContext(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getRegInfo(), getSPIRVTypeForVReg(), getSPIRVTypeID(), I, and TII.
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVBoolType | ( | MachineIRBuilder & | MIRBuilder | ) |
Definition at line 1335 of file SPIRVGlobalRegistry.cpp.
References llvm::IntegerType::get(), llvm::Function::getContext(), llvm::MachineFunction::getFunction(), llvm::MachineIRBuilder::getMF(), and getOrCreateSPIRVType().
Referenced by llvm::buildBoolRegister(), llvm::generateGroupInst(), and llvm::genWorkgroupQuery().
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVFloatType | ( | unsigned | BitWidth, |
MachineInstr & | I, | ||
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 1314 of file SPIRVGlobalRegistry.cpp.
References llvm::BitWidth, CurMF, llvm::Function::getContext(), llvm::Type::getDoubleTy(), llvm::Type::getFloatTy(), llvm::MachineFunction::getFunction(), llvm::Type::getHalfTy(), getOrCreateSPIRVType(), I, llvm_unreachable, and TII.
Referenced by assignFloatTypeToVReg().
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVIntegerType | ( | unsigned | BitWidth, |
MachineInstr & | I, | ||
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 1303 of file SPIRVGlobalRegistry.cpp.
References llvm::BitWidth, CurMF, llvm::IntegerType::get(), llvm::Function::getContext(), llvm::MachineFunction::getFunction(), getOrCreateSPIRVType(), I, and TII.
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVIntegerType | ( | unsigned | BitWidth, |
MachineIRBuilder & | MIRBuilder | ||
) |
Definition at line 1271 of file SPIRVGlobalRegistry.cpp.
References llvm::BitWidth, llvm::IntegerType::get(), llvm::Function::getContext(), llvm::MachineFunction::getFunction(), llvm::MachineIRBuilder::getMF(), and getOrCreateSPIRVType().
Referenced by assignIntTypeToVReg(), llvm::buildAtomicCompareExchangeInst(), buildConstantInt(), llvm::buildConstantIntReg(), llvm::buildEnqueueKernel(), llvm::generateImageSizeQueryInst(), llvm::genWorkgroupQuery(), getOrCreateSPIRVArrayType(), and propagateSPIRVType().
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVPointerType | ( | SPIRVType * | BaseType, |
MachineInstr & | I, | ||
const SPIRVInstrInfo & | TII, | ||
SPIRV::StorageClass::StorageClass | SClass = SPIRV::StorageClass::Function |
||
) |
Definition at line 1421 of file SPIRVGlobalRegistry.cpp.
References getOrCreateSPIRVPointerType(), and I.
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVPointerType | ( | SPIRVType * | BaseType, |
MachineIRBuilder & | MIRBuilder, | ||
SPIRV::StorageClass::StorageClass | SClass = SPIRV::StorageClass::Function |
||
) |
Definition at line 1399 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addUse(), llvm::BuildMI(), createTypeVReg(), CurMF, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::TypedPointerType::get(), llvm::MCInstrInfo::get(), llvm::MachineIRBuilder::getDebugLoc(), llvm::MachineIRBuilder::getInsertPt(), llvm::MachineIRBuilder::getMBB(), llvm::MachineFunction::getRegInfo(), getSPIRVTypeForVReg(), getSPIRVTypeID(), llvm::MachineIRBuilder::getTII(), getTypeForSPIRVType(), and llvm::storageClassToAddressSpace().
Referenced by llvm::buildBuiltinVariableLoad(), llvm::buildEnqueueKernel(), createNewPtrType(), generateAssignInstrs(), getArgSPIRVType(), getOrCreateSPIRVPointerType(), getOrCreateSPIRVTypeByName(), insertBitcasts(), validateGroupAsyncCopyPtr(), and validateLifetimeStart().
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVType | ( | const Type * | Type, |
MachineIRBuilder & | MIRBuilder, | ||
SPIRV::AccessQualifier::AccessQualifier | AQ = SPIRV::AccessQualifier::ReadWrite , |
||
bool | EmitIR = true |
||
) |
Definition at line 961 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::Function::getContext(), llvm::MachineFunction::getFunction(), llvm::Type::getInt8Ty(), llvm::MachineIRBuilder::getMF(), llvm::getPointerAddressSpace(), getSPIRVTypeForVReg(), llvm::isPointerTy(), llvm::isSpecialOpaqueType(), and llvm::isTypedPointerTy().
Referenced by addConstantsToTrack(), assignTypeToVReg(), buildConstantFP(), buildConstantSampler(), llvm::buildNDRange(), createNewPtrType(), generateAssignInstrs(), getArgSPIRVType(), llvm::getCoopMatrType(), llvm::getImageType(), getOrCreateSPIRVBoolType(), llvm::getOrCreateSPIRVDeviceEventPointer(), getOrCreateSPIRVFloatType(), getOrCreateSPIRVIntegerType(), getOrCreateSPIRVTypeByName(), getOrCreateSPIRVVectorType(), llvm::insertAssignInstr(), insertBitcasts(), insertInlineAsmProcess(), llvm::SPIRVLegalizerInfo::legalizeCustom(), llvm::SPIRVCallLowering::lowerCall(), llvm::SPIRVCallLowering::lowerFormalArguments(), propagateSPIRVType(), and validateLifetimeStart().
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVType | ( | unsigned | BitWidth, |
MachineInstr & | I, | ||
const SPIRVInstrInfo & | TII, | ||
unsigned | SPIRVOPcode, | ||
Type * | LLVMTy | ||
) |
Definition at line 1286 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::BitWidth, llvm::BuildMI(), createTypeVReg(), CurMF, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::MachineFunction::getRegInfo(), getSPIRVTypeForVReg(), getSPIRVTypeID(), I, and TII.
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVTypeByName | ( | StringRef | TypeStr, |
MachineIRBuilder & | MIRBuilder, | ||
SPIRV::StorageClass::StorageClass | SC = SPIRV::StorageClass::Function , |
||
SPIRV::AccessQualifier::AccessQualifier | AQ = SPIRV::AccessQualifier::ReadWrite |
||
) |
Definition at line 1224 of file SPIRVGlobalRegistry.cpp.
References llvm::StringRef::consume_back(), llvm::StringRef::consume_front(), llvm::StringRef::find(), llvm::StringRef::getAsInteger(), llvm::MachineIRBuilder::getContext(), llvm::Function::getContext(), llvm::MachineFunction::getFunction(), llvm::MachineIRBuilder::getMF(), getOrCreateSPIRVPointerType(), getOrCreateSPIRVType(), getOrCreateSPIRVVectorType(), llvm::hasBuiltinTypePrefix(), llvm::parseBasicTypeName(), llvm::SPIRV::parseBuiltinTypeNameToTargetExtType(), llvm::StringRef::starts_with(), llvm::StringRef::str(), and llvm::StringRef::substr().
Referenced by buildConstantSampler(), llvm::generateAsyncCopy(), and llvm::generateSampleImageInst().
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVVectorType | ( | SPIRVType * | BaseType, |
unsigned | NumElements, | ||
MachineInstr & | I, | ||
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 1363 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addUse(), llvm::BuildMI(), createTypeVReg(), CurMF, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::FixedVectorType::get(), llvm::MachineFunction::getRegInfo(), getSPIRVTypeForVReg(), getSPIRVTypeID(), getTypeForSPIRVType(), I, and TII.
SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVVectorType | ( | SPIRVType * | BaseType, |
unsigned | NumElements, | ||
MachineIRBuilder & | MIRBuilder | ||
) |
Definition at line 1355 of file SPIRVGlobalRegistry.cpp.
References llvm::FixedVectorType::get(), getOrCreateSPIRVType(), and getTypeForSPIRVType().
Referenced by assignVectTypeToVReg(), llvm::buildBoolRegister(), llvm::generateGroupInst(), llvm::generateImageSizeQueryInst(), llvm::generateReadImageInst(), llvm::genWorkgroupQuery(), getOrCreateSPIRVTypeByName(), and propagateSPIRVType().
Register SPIRVGlobalRegistry::getOrCreateUndef | ( | MachineInstr & | I, |
SPIRVType * | SpvType, | ||
const SPIRVInstrInfo & | TII | ||
) |
Definition at line 1428 of file SPIRVGlobalRegistry.cpp.
References llvm::SPIRVGeneralDuplicatesTracker::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), assert(), assignSPIRVTypeToVReg(), llvm::BuildMI(), llvm::constrainSelectedInstRegOperands(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), CurMF, llvm::SPIRVGeneralDuplicatesTracker::find(), llvm::UndefValue::get(), llvm::MachineFunction::getRegInfo(), getSPIRVTypeID(), llvm::MachineFunction::getSubtarget(), getTypeForSPIRVType(), I, llvm::Register::isValid(), llvm::LLT::scalar(), llvm::MachineRegisterInfo::setRegClass(), and TII.
Definition at line 1072 of file SPIRVGlobalRegistry.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and getSPIRVTypeForVReg().
Referenced by getPointeeTypeOp(), and validateLifetimeStart().
Definition at line 1078 of file SPIRVGlobalRegistry.cpp.
References llvm::MachineInstr::getOpcode(), getPointeeType(), and getSPIRVTypeForVReg().
|
inline |
Definition at line 386 of file SPIRVGlobalRegistry.h.
Referenced by llvm::buildBuiltinVariableLoad(), llvm::buildEnqueueKernel(), buildGlobalVariable(), llvm::buildNDRange(), createNewIdReg(), llvm::genWorkgroupQuery(), getRegClass(), and processInstrsWithTypeFolding().
SPIRV::StorageClass::StorageClass SPIRVGlobalRegistry::getPointerStorageClass | ( | Register | VReg | ) | const |
Definition at line 1103 of file SPIRVGlobalRegistry.cpp.
References assert(), and getSPIRVTypeForVReg().
Referenced by llvm::buildAtomicLoadInst(), llvm::buildAtomicStoreInst(), and llvm::buildMemSemanticsReg().
Definition at line 1032 of file SPIRVGlobalRegistry.cpp.
References assert(), getSPIRVTypeForVReg(), and llvm_unreachable.
Referenced by buildConstantInt(), llvm::buildSelectInst(), createNewIdReg(), llvm::generateBuiltinVar(), llvm::generateReadImageInst(), llvm::generateWaveInst(), getOrCreateConsIntVector(), getOrCreateConstInt(), getOrCreateConstIntArray(), getOrCreateConstVector(), processNewInstrs(), and propagateSPIRVType().
Definition at line 1018 of file SPIRVGlobalRegistry.cpp.
References getScalarOrVectorComponentCount(), and getSPIRVTypeForVReg().
Referenced by llvm::generateConvertInst(), getScalarOrVectorComponentCount(), and propagateSPIRVType().
Definition at line 1023 of file SPIRVGlobalRegistry.cpp.
SPIRVType * SPIRVGlobalRegistry::getSPIRVTypeForVReg | ( | Register | VReg, |
const MachineFunction * | MF = nullptr |
||
) | const |
Definition at line 950 of file SPIRVGlobalRegistry.cpp.
References CurMF.
Referenced by llvm::buildAtomicCompareExchangeInst(), buildGlobalVariable(), llvm::buildNDRange(), createNewIdReg(), llvm::SPIRVTargetLowering::finalizeLowering(), llvm::generateCoopMatrInst(), llvm::generateDotOrFMulInst(), llvm::generateGroupInst(), llvm::generateImageMiscQueryInst(), llvm::generateImageSizeQueryInst(), llvm::generateIntelSubgroupsInst(), llvm::generateReadImageInst(), llvm::generateSampleImageInst(), llvm::genWorkgroupQuery(), getIsFloat(), getNumScalarOrVectorTotalBitWidth(), getOrCreateConstIntArray(), getOrCreateOpTypeFunctionWithArgs(), getOrCreateSPIRVArrayType(), getOrCreateSPIRVBoolType(), getOrCreateSPIRVPointerType(), getOrCreateSPIRVType(), getOrCreateSPIRVVectorType(), getPointeeType(), getPointeeTypeOp(), getPointerStorageClass(), getRegClass(), getScalarOrVectorBitWidth(), getScalarOrVectorComponentCount(), hasSPIRVTypeForVReg(), insertBitcasts(), isScalarOfType(), isScalarOrVectorOfType(), llvm::SPIRVLegalizerInfo::legalizeCustom(), llvm::SPIRVCallLowering::lowerCall(), processNewInstrs(), propagateSPIRVType(), retrieveScalarOrVectorIntType(), validateAccessChain(), validateFunCallMachineDef(), validateGroupAsyncCopyPtr(), validateGroupWaitEventsPtr(), validateLifetimeStart(), and validatePtrTypes().
Definition at line 810 of file SPIRVGlobalRegistry.cpp.
References assert(), llvm::MachineInstr::defs(), llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::uses().
Referenced by addConstantsToTrack(), llvm::buildAtomicCompareExchangeInst(), llvm::buildAtomicFlagInst(), llvm::buildAtomicFloatingRMWInst(), llvm::buildAtomicLoadInst(), llvm::buildAtomicRMWInst(), buildConstantFP(), buildConstantInt(), buildConstantSampler(), llvm::buildEnqueueKernel(), buildGlobalVariable(), llvm::buildNDRange(), doInsertBitcast(), llvm::generateAsyncCopy(), llvm::generateAtomicInst(), llvm::generateConstructInst(), llvm::generateConvertInst(), llvm::generateCoopMatrInst(), llvm::generateDotOrFMulInst(), llvm::generateEnqueueInst(), llvm::generateExtInst(), llvm::generateGroupInst(), llvm::generateGroupUniformInst(), llvm::generateImageMiscQueryInst(), llvm::generateImageSizeQueryInst(), llvm::generateIntelSubgroupsInst(), llvm::generateKernelClockInst(), llvm::generateLoadStoreInst(), llvm::generateReadImageInst(), llvm::generateRelationalInst(), llvm::generateSampleImageInst(), llvm::generateSpecConstantInst(), llvm::generateVectorLoadStoreInst(), getOrCreateConstFP(), getOrCreateConstInt(), getOrCreateConstNullPtr(), getOrCreateOpTypeCoopMatr(), getOrCreateOpTypeFunctionWithArgs(), getOrCreateOpTypeImage(), getOrCreateOpTypeSampledImage(), getOrCreateSPIRVArrayType(), getOrCreateSPIRVBoolType(), getOrCreateSPIRVPointerType(), getOrCreateSPIRVType(), getOrCreateSPIRVVectorType(), getOrCreateUndef(), llvm::insertAssignInstr(), insertInlineAsmProcess(), llvm::SPIRV::lowerBuiltinType(), llvm::SPIRVCallLowering::lowerCall(), and llvm::SPIRVCallLowering::lowerFormalArguments().
Definition at line 303 of file SPIRVGlobalRegistry.h.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by llvm::buildBoolRegister(), buildConstantInt(), buildConstantSampler(), buildGlobalVariable(), fixFunctionTypeIfPtrArgs(), getOrCreateConsIntVector(), getOrCreateConstIntArray(), getOrCreateConstNullPtr(), getOrCreateConstVector(), getOrCreateSPIRVArrayType(), getOrCreateSPIRVPointerType(), getOrCreateSPIRVVectorType(), getOrCreateUndef(), validateFunCallMachineDef(), and validatePtrTypes().
|
inline |
Definition at line 254 of file SPIRVGlobalRegistry.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty().
Definition at line 332 of file SPIRVGlobalRegistry.h.
References getSPIRVTypeForVReg().
Definition at line 347 of file SPIRVGlobalRegistry.h.
bool SPIRVGlobalRegistry::isBitcastCompatible | ( | const SPIRVType * | Type1, |
const SPIRVType * | Type2 | ||
) | const |
Definition at line 1083 of file SPIRVGlobalRegistry.cpp.
References getNumScalarOrVectorTotalBitWidth(), llvm::MachineInstr::getOpcode(), retrieveScalarOrVectorIntType(), and Type2.
Referenced by validatePtrTypes().
Definition at line 996 of file SPIRVGlobalRegistry.cpp.
References assert(), and getSPIRVTypeForVReg().
Referenced by llvm::buildAtomicCompareExchangeInst(), and llvm::generateReadImageInst().
Definition at line 1003 of file SPIRVGlobalRegistry.cpp.
References assert(), llvm::MachineInstr::getOpcode(), and getSPIRVTypeForVReg().
Referenced by llvm::SPIRVTargetLowering::finalizeLowering(), and llvm::generateConvertInst().
Definition at line 1067 of file SPIRVGlobalRegistry.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), and retrieveScalarOrVectorIntType().
|
inline |
Definition at line 248 of file SPIRVGlobalRegistry.h.
References F, and llvm::MachineOperand::getParent().
Referenced by llvm::SPIRVCallLowering::lowerFormalArguments().
|
inline |
Definition at line 243 of file SPIRVGlobalRegistry.h.
References F.
const SPIRVType * SPIRVGlobalRegistry::retrieveScalarOrVectorIntType | ( | const SPIRVType * | Type | ) | const |
Definition at line 1060 of file SPIRVGlobalRegistry.cpp.
References getSPIRVTypeForVReg().
Referenced by isBitcastCompatible(), and isScalarOrVectorSigned().
|
inline |
Definition at line 146 of file SPIRVGlobalRegistry.h.
|
inline |
Definition at line 340 of file SPIRVGlobalRegistry.h.
References CurMF.
Referenced by llvm::SPIRVTargetLowering::finalizeLowering(), llvm::SPIRVCallLowering::lowerCall(), llvm::SPIRVCallLowering::lowerFormalArguments(), and validateFunCallMachineDef().
MachineFunction* llvm::SPIRVGlobalRegistry::CurMF |
Definition at line 103 of file SPIRVGlobalRegistry.h.
Referenced by assignFloatTypeToVReg(), assignIntTypeToVReg(), assignVectTypeToVReg(), buildConstantInt(), buildGlobalVariable(), getOrCreateConstFP(), getOrCreateConstInt(), getOrCreateConstNullPtr(), getOrCreateOpTypeFunctionWithArgs(), getOrCreateSPIRVArrayType(), getOrCreateSPIRVBoolType(), getOrCreateSPIRVFloatType(), getOrCreateSPIRVIntegerType(), getOrCreateSPIRVPointerType(), getOrCreateSPIRVType(), getOrCreateSPIRVVectorType(), getOrCreateUndef(), getSPIRVTypeForVReg(), processNewInstrs(), and setCurrentFunc().