LLVM 20.0.0git
|
Namespaces | |
namespace | AccessQualifier |
namespace | AddressingModel |
namespace | BuiltIn |
namespace | Capability |
namespace | Decoration |
namespace | Dim |
namespace | ExecutionMode |
namespace | ExecutionModel |
namespace | Extension |
namespace | FPFastMathMode |
namespace | FPRoundingMode |
namespace | FunctionControl |
namespace | FunctionParameterAttribute |
namespace | GLSLExtInst |
namespace | GroupOperation |
namespace | ImageChannelDataType |
namespace | ImageChannelOrder |
namespace | ImageFormat |
namespace | ImageOperand |
namespace | InstructionSet |
namespace | KernelEnqueueFlags |
namespace | KernelProfilingInfo |
namespace | LinkageType |
namespace | LoopControl |
namespace | MemoryModel |
namespace | MemoryOperand |
namespace | MemorySemantics |
namespace | NonSemanticExtInst |
namespace | Opcode |
namespace | OpenCLExtInst |
namespace | OperandCategory |
namespace | SamplerAddressingMode |
namespace | SamplerFilterMode |
namespace | Scope |
namespace | SelectionControl |
namespace | SourceLanguage |
namespace | StorageClass |
Classes | |
struct | AtomicFloatingBuiltin |
struct | BuiltinType |
struct | CapabilityEntry |
class | ConvergenceRegion |
class | ConvergenceRegionAnalyzer |
class | ConvergenceRegionInfo |
struct | ConvertBuiltin |
struct | DemangledBuiltin |
class | DTSortableEntry |
struct | ExtendedBuiltin |
struct | ExtensionEntry |
struct | GetBuiltin |
struct | GroupBuiltin |
struct | GroupUniformBuiltin |
union | ImageAttrs |
struct | ImageQueryBuiltin |
struct | IncomingCall |
struct | IntelSubgroupsBuiltin |
struct | ModuleAnalysisInfo |
struct | NativeBuiltin |
struct | OpenCLType |
struct | RequirementHandler |
struct | Requirements |
struct | SymbolicOperand |
struct | VectorLoadStoreBuiltin |
Typedefs | |
using | SpecialTypeDescriptor = std::tuple< const Type *, unsigned, unsigned > |
using | InstrList = SmallVector< MachineInstr * > |
using | LocalToGlobalRegTable = std::map< Register, Register > |
using | RegisterAliasMapTy = std::map< const MachineFunction *, LocalToGlobalRegTable > |
Enumerations | |
enum | SpecialTypeKind { STK_Empty = 0 , STK_Image , STK_SampledImage , STK_Sampler , STK_Pipe , STK_DeviceEvent , STK_Pointer , STK_Last = -1 } |
enum | AsmComments { ASM_PRINTER_WIDTH16 = MachineInstr::TAsmComments } |
enum | ModuleSectionType { MB_EntryPoints , MB_DebugNames , MB_DebugModuleProcessed , MB_Annotations , MB_TypeConstVars , MB_ExtFuncDecls , NUM_MODULE_SECTIONS } |
Functions | |
std::optional< IntrinsicInst * > | getConvergenceToken (BasicBlock *BB) |
std::optional< const IntrinsicInst * > | getConvergenceToken (const BasicBlock *BB) |
ConvergenceRegionInfo | getConvergenceRegions (Function &F, DominatorTree &DT, LoopInfo &LI) |
std::string | lookupBuiltinNameHelper (StringRef DemangledCall) |
Parses the name part of the demangled builtin call. | |
std::tuple< int, unsigned, unsigned > | mapBuiltinToOpcode (const StringRef DemangledCall, SPIRV::InstructionSet::InstructionSet Set) |
Helper function for finding a builtin function attributes by a demangled function name. | |
std::optional< bool > | lowerBuiltin (const StringRef DemangledCall, SPIRV::InstructionSet::InstructionSet Set, MachineIRBuilder &MIRBuilder, const Register OrigRet, const Type *OrigRetTy, const SmallVectorImpl< Register > &Args, SPIRVGlobalRegistry *GR) |
Type * | parseBuiltinCallArgumentBaseType (const StringRef DemangledCall, unsigned ArgIdx, LLVMContext &Ctx) |
Parses the provided ArgIdx argument base type in the DemangledCall skeleton. | |
TargetExtType * | parseBuiltinTypeNameToTargetExtType (std::string TypeName, LLVMContext &Context) |
Translates a string representing a SPIR-V or OpenCL builtin type to a TargetExtType that can be further lowered with lowerBuiltinType(). | |
SPIRVType * | lowerBuiltinType (const Type *OpaqueType, SPIRV::AccessQualifier::AccessQualifier AccessQual, MachineIRBuilder &MIRBuilder, SPIRVGlobalRegistry *GR) |
std::optional< bool > | lowerBuiltin (const StringRef DemangledCall, InstructionSet::InstructionSet Set, MachineIRBuilder &MIRBuilder, const Register OrigRet, const Type *OrigRetTy, const SmallVectorImpl< Register > &Args, SPIRVGlobalRegistry *GR) |
Lowers a builtin function call using the provided DemangledCall skeleton and external instruction Set . | |
SPIRVType * | lowerBuiltinType (const Type *Type, AccessQualifier::AccessQualifier AccessQual, MachineIRBuilder &MIRBuilder, SPIRVGlobalRegistry *GR) |
Handles the translation of the provided special opaque/builtin type Type to SPIR-V type. | |
SpecialTypeDescriptor | make_descr_image (const Type *SampledTy, unsigned Dim, unsigned Depth, unsigned Arrayed, unsigned MS, unsigned Sampled, unsigned ImageFormat, unsigned AQ=0) |
SpecialTypeDescriptor | make_descr_sampled_image (const Type *SampledTy, const MachineInstr *ImageTy) |
SpecialTypeDescriptor | make_descr_sampler () |
SpecialTypeDescriptor | make_descr_pipe (uint8_t AQ) |
SpecialTypeDescriptor | make_descr_event () |
SpecialTypeDescriptor | make_descr_pointee (const Type *ElementType, unsigned AddressSpace) |
using llvm::SPIRV::InstrList = typedef SmallVector<MachineInstr *> |
Definition at line 126 of file SPIRVModuleAnalysis.h.
using llvm::SPIRV::LocalToGlobalRegTable = typedef std::map<Register, Register> |
Definition at line 128 of file SPIRVModuleAnalysis.h.
using llvm::SPIRV::RegisterAliasMapTy = typedef std::map<const MachineFunction *, LocalToGlobalRegTable> |
Definition at line 129 of file SPIRVModuleAnalysis.h.
using llvm::SPIRV::SpecialTypeDescriptor = typedef std::tuple<const Type *, unsigned, unsigned> |
Definition at line 66 of file SPIRVDuplicatesTracker.h.
Enumerator | |
---|---|
ASM_PRINTER_WIDTH16 |
Definition at line 59 of file SPIRVInstrInfo.h.
Enumerator | |
---|---|
MB_EntryPoints | |
MB_DebugNames | |
MB_DebugModuleProcessed | |
MB_Annotations | |
MB_TypeConstVars | |
MB_ExtFuncDecls | |
NUM_MODULE_SECTIONS |
Definition at line 32 of file SPIRVModuleAnalysis.h.
Enumerator | |
---|---|
STK_Empty | |
STK_Image | |
STK_SampledImage | |
STK_Sampler | |
STK_Pipe | |
STK_DeviceEvent | |
STK_Pointer | |
STK_Last |
Definition at line 55 of file SPIRVDuplicatesTracker.h.
ConvergenceRegionInfo llvm::SPIRV::getConvergenceRegions | ( | Function & | F, |
DominatorTree & | DT, | ||
LoopInfo & | LI | ||
) |
Definition at line 316 of file SPIRVConvergenceRegionAnalysis.cpp.
References llvm::SPIRV::ConvergenceRegionAnalyzer::analyze(), and F.
Referenced by llvm::SPIRVConvergenceRegionAnalysis::run(), and llvm::SPIRVConvergenceRegionAnalysisWrapperPass::runOnFunction().
std::optional< IntrinsicInst * > llvm::SPIRV::getConvergenceToken | ( | BasicBlock * | BB | ) |
Definition at line 115 of file SPIRVConvergenceRegionAnalysis.cpp.
Referenced by llvm::SPIRV::ConvergenceRegionAnalyzer::analyze(), and llvm::SPIRV::ConvergenceRegion::ConvergenceRegion().
std::optional< const IntrinsicInst * > llvm::SPIRV::getConvergenceToken | ( | const BasicBlock * | BB | ) |
Definition at line 119 of file SPIRVConvergenceRegionAnalysis.cpp.
std::string llvm::SPIRV::lookupBuiltinNameHelper | ( | StringRef | DemangledCall | ) |
Parses the name part of the demangled builtin call.
Definition at line 174 of file SPIRVBuiltins.cpp.
References contains(), llvm::StringRef::starts_with(), and llvm::StringRef::substr().
Referenced by llvm::lookupBuiltin().
std::optional< bool > llvm::SPIRV::lowerBuiltin | ( | const StringRef | DemangledCall, |
InstructionSet::InstructionSet | Set, | ||
MachineIRBuilder & | MIRBuilder, | ||
const Register | OrigRet, | ||
const Type * | OrigRetTy, | ||
const SmallVectorImpl< Register > & | Args, | ||
SPIRVGlobalRegistry * | GR | ||
) |
Lowers a builtin function call using the provided DemangledCall
skeleton and external instruction Set
.
DemangledCall
is the skeleton of the lowered builtin function call. Set
is the external instruction set containing the given builtin. OrigRet
is the single original virtual return register if defined, Register(0) otherwise. OrigRetTy
is the type of the OrigRet
. Args
are the arguments of the lowered builtin call.
std::optional< bool > llvm::SPIRV::lowerBuiltin | ( | const StringRef | DemangledCall, |
SPIRV::InstructionSet::InstructionSet | Set, | ||
MachineIRBuilder & | MIRBuilder, | ||
const Register | OrigRet, | ||
const Type * | OrigRetTy, | ||
const SmallVectorImpl< Register > & | Args, | ||
SPIRVGlobalRegistry * | GR | ||
) |
Definition at line 2531 of file SPIRVBuiltins.cpp.
References assert(), llvm::SPIRVGlobalRegistry::assignTypeToVReg(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::dbgs(), llvm::generateAsyncCopy(), llvm::generateAtomicFloatingInst(), llvm::generateAtomicInst(), llvm::generateBarrierInst(), llvm::generateBuiltinVar(), llvm::generateCastToPtrInst(), llvm::generateConstructInst(), llvm::generateConvertInst(), llvm::generateCoopMatrInst(), llvm::generateDotOrFMulInst(), llvm::generateEnqueueInst(), llvm::generateExtInst(), llvm::generateGetQueryInst(), llvm::generateGroupInst(), llvm::generateGroupUniformInst(), llvm::generateImageMiscQueryInst(), llvm::generateImageSizeQueryInst(), llvm::generateIntelSubgroupsInst(), llvm::generateKernelClockInst(), llvm::generateLoadStoreInst(), llvm::generateReadImageInst(), llvm::generateRelationalInst(), llvm::generateSampleImageInst(), llvm::generateSelectInst(), llvm::generateSpecConstantInst(), llvm::generateVectorLoadStoreInst(), llvm::generateWaveInst(), llvm::generateWriteImageInst(), llvm::MachineIRBuilder::getMRI(), llvm::MachineRegisterInfo::getRegClassOrNull(), llvm::Type::isVoidTy(), LLVM_DEBUG, llvm::lookupBuiltin(), llvm::LLT::scalar(), llvm::MachineRegisterInfo::setRegClass(), and llvm::MachineRegisterInfo::setType().
Referenced by llvm::SPIRVCallLowering::lowerCall().
SPIRVType * llvm::SPIRV::lowerBuiltinType | ( | const Type * | OpaqueType, |
SPIRV::AccessQualifier::AccessQualifier | AccessQual, | ||
MachineIRBuilder & | MIRBuilder, | ||
SPIRVGlobalRegistry * | GR | ||
) |
Definition at line 2845 of file SPIRVBuiltins.cpp.
References llvm::buildOpName(), llvm::dbgs(), llvm::MachineIRBuilder::getContext(), llvm::getCoopMatrType(), llvm::getImageType(), llvm::MachineIRBuilder::getMRI(), llvm::getNonParameterizedType(), llvm::MachineRegisterInfo::getNumVirtRegs(), llvm::SPIRVGlobalRegistry::getOrCreateOpTypeDeviceEvent(), llvm::getPipeType(), llvm::getSampledImageType(), llvm::getSamplerType(), llvm::SPIRVGlobalRegistry::getSPIRVTypeID(), llvm::Type::getStructName(), LLVM_DEBUG, Name, llvm::SPIRV::BuiltinType::Opcode, parseBuiltinTypeNameToTargetExtType(), llvm::report_fatal_error(), and llvm::StringRef::str().
SPIRVType * llvm::SPIRV::lowerBuiltinType | ( | const Type * | Type, |
AccessQualifier::AccessQualifier | AccessQual, | ||
MachineIRBuilder & | MIRBuilder, | ||
SPIRVGlobalRegistry * | GR | ||
) |
Handles the translation of the provided special opaque/builtin type Type
to SPIR-V type.
Generates the corresponding machine instructions for the target type or gets the already existing OpType<...> register from the global registry GR
.
Type
is the special opaque/builtin type to be lowered.
|
inline |
Definition at line 125 of file SPIRVDuplicatesTracker.h.
References STK_DeviceEvent.
Referenced by llvm::SPIRVGlobalRegistry::getOrCreateOpTypeDeviceEvent().
|
inline |
Definition at line 94 of file SPIRVDuplicatesTracker.h.
References llvm::Depth, and STK_Image.
Referenced by llvm::SPIRVGlobalRegistry::getOrCreateOpTypeImage().
|
inline |
Definition at line 121 of file SPIRVDuplicatesTracker.h.
References STK_Pipe.
Referenced by llvm::SPIRVGlobalRegistry::getOrCreateOpTypePipe().
|
inline |
Definition at line 129 of file SPIRVDuplicatesTracker.h.
References STK_Pointer.
Referenced by llvm::SPIRVGeneralDuplicatesTracker::add(), and llvm::SPIRVGeneralDuplicatesTracker::find().
|
inline |
Definition at line 104 of file SPIRVDuplicatesTracker.h.
References assert(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), STK_SampledImage, and llvm::SPIRV::ImageAttrs::Val.
Referenced by llvm::SPIRVGlobalRegistry::getOrCreateOpTypeSampledImage().
|
inline |
Definition at line 117 of file SPIRVDuplicatesTracker.h.
References STK_Sampler.
Referenced by llvm::SPIRVGlobalRegistry::getOrCreateOpTypeSampler().
std::tuple< int, unsigned, unsigned > llvm::SPIRV::mapBuiltinToOpcode | ( | const StringRef | DemangledCall, |
SPIRV::InstructionSet::InstructionSet | Set | ||
) |
Helper function for finding a builtin function attributes by a demangled function name.
Defined in SPIRVBuiltins.cpp.
Definition at line 2466 of file SPIRVBuiltins.cpp.
References llvm::lookupBuiltin(), and Reg.
Type * llvm::SPIRV::parseBuiltinCallArgumentBaseType | ( | const StringRef | DemangledCall, |
unsigned | ArgIdx, | ||
LLVMContext & | Ctx | ||
) |
Parses the provided ArgIdx
argument base type in the DemangledCall
skeleton.
A base type is either a basic type (e.g. i32 for int), pointer element type (e.g. i8 for char*), or builtin type (TargetExtType).
DemangledCall
is the skeleton of the lowered builtin function call. ArgIdx
is the index of the argument to parse.
Definition at line 2629 of file SPIRVBuiltins.cpp.
References assert(), llvm::StringRef::consume_back(), llvm::StringRef::consume_front(), llvm::StringRef::ends_with(), llvm::StringRef::find(), llvm::StringRef::find_first_of(), llvm::VectorType::get(), llvm::StringRef::getAsInteger(), llvm::Type::getInt8Ty(), llvm::hasBuiltinTypePrefix(), llvm::parseBasicTypeName(), parseBuiltinTypeNameToTargetExtType(), llvm::SmallVectorBase< Size_T >::size(), llvm::StringRef::slice(), llvm::StringRef::split(), llvm::StringRef::str(), and llvm::StringRef::substr().
TargetExtType * llvm::SPIRV::parseBuiltinTypeNameToTargetExtType | ( | std::string | TypeName, |
LLVMContext & | Context | ||
) |
Translates a string representing a SPIR-V or OpenCL builtin type to a TargetExtType that can be further lowered with lowerBuiltinType().
TypeName
is the full string representation of the SPIR-V or OpenCL builtin type.
Definition at line 2796 of file SPIRVBuiltins.cpp.
References assert(), llvm::StringRef::contains(), llvm::StringRef::find(), llvm::TargetExtType::get(), isDigit(), llvm::parseTypeString(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::report_fatal_error(), llvm::SPIRV::OpenCLType::SpirvTypeLiteral, llvm::StringRef::starts_with(), and llvm::StringRef::substr().
Referenced by llvm::SPIRVGlobalRegistry::getOrCreateSPIRVTypeByName(), lowerBuiltinType(), and parseBuiltinCallArgumentBaseType().