LLVM 22.0.0git
llvm::SPIRVGlobalRegistry Class Reference

#include "Target/SPIRV/SPIRVGlobalRegistry.h"

Inheritance diagram for llvm::SPIRVGlobalRegistry:
[legend]

Public Member Functions

 SPIRVGlobalRegistry (unsigned PointerSize)
void setBound (unsigned V)
unsigned getBound ()
void addGlobalObject (const Value *V, const MachineFunction *MF, Register R)
const ValuegetGlobalObject (const MachineFunction *MF, Register R)
void addReturnType (const Function *ArgF, TypedPointerType *DerivedTy)
const TypedPointerTypefindReturnType (const Function *ArgF)
void addAssignPtrTypeInstr (Value *Val, CallInst *AssignPtrTyCI)
CallInstfindAssignPtrTypeInstr (const Value *Val)
void updateIfExistAssignPtrTypeInstr (Value *OldVal, Value *NewVal, bool DeleteOld)
void addMutated (Value *Val, Type *Ty)
TypefindMutated (const Value *Val)
void addValueAttrs (MachineInstr *Key, std::pair< Type *, std::string > Val)
bool findValueAttrs (const MachineInstr *Key, Type *&Ty, StringRef &Name)
void addDeducedElementType (Value *Val, Type *Ty)
TypefindDeducedElementType (const Value *Val)
void updateIfExistDeducedElementType (Value *OldVal, Value *NewVal, bool DeleteOld)
void addDeducedCompositeType (Value *Val, Type *Ty)
TypefindDeducedCompositeType (const Value *Val)
TypegetDeducedGlobalValueType (const GlobalValue *Global)
const MachineOperandgetFunctionDefinitionByUse (const MachineOperand *Use)
const MachineInstrgetFunctionDefinition (const Function *F)
const FunctiongetFunctionByDefinition (const MachineInstr *MI)
void recordFunctionPointer (const MachineOperand *MO, const Function *F)
void recordFunctionDefinition (const Function *F, const MachineOperand *MO)
bool hasConstFunPtr ()
void addForwardCall (const Function *F, MachineInstr *MI)
SmallPtrSet< MachineInstr *, 8 > * getForwardCalls (const Function *F)
SPIRVTypeassignTypeToVReg (const Type *Type, Register VReg, MachineIRBuilder &MIRBuilder, SPIRV::AccessQualifier::AccessQualifier AQ, bool EmitIR)
SPIRVTypeassignIntTypeToVReg (unsigned BitWidth, Register VReg, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypeassignFloatTypeToVReg (unsigned BitWidth, Register VReg, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypeassignVectTypeToVReg (SPIRVType *BaseType, unsigned NumElements, Register VReg, MachineInstr &I, const SPIRVInstrInfo &TII)
void assignSPIRVTypeToVReg (SPIRVType *Type, Register VReg, const MachineFunction &MF)
SPIRVTypegetOrCreateSPIRVType (const Type *Type, MachineInstr &I, SPIRV::AccessQualifier::AccessQualifier AQ, bool EmitIR)
SPIRVTypegetOrCreateSPIRVType (const Type *Type, MachineIRBuilder &MIRBuilder, SPIRV::AccessQualifier::AccessQualifier AQ, bool EmitIR)
const TypegetTypeForSPIRVType (const SPIRVType *Ty) const
SPIRVTypegetPointeeType (SPIRVType *PtrType)
unsigned getPointeeTypeOp (Register PtrReg)
SPIRVTypegetOrCreateSPIRVTypeByName (StringRef TypeStr, MachineIRBuilder &MIRBuilder, bool EmitIR, SPIRV::StorageClass::StorageClass SC=SPIRV::StorageClass::Function, SPIRV::AccessQualifier::AccessQualifier AQ=SPIRV::AccessQualifier::ReadWrite)
SPIRVTypegetSPIRVTypeForVReg (Register VReg, const MachineFunction *MF=nullptr) const
SPIRVTypegetResultType (Register VReg, MachineFunction *MF=nullptr)
bool hasSPIRVTypeForVReg (Register VReg) const
Register getSPIRVTypeID (const SPIRVType *SpirvType) const
MachineFunctionsetCurrentFunc (MachineFunction &MF)
bool isAggregateType (SPIRVType *Type) const
bool isScalarOfType (Register VReg, unsigned TypeOpcode) const
bool isScalarOrVectorOfType (Register VReg, unsigned TypeOpcode) const
bool isResourceType (SPIRVType *Type) const
unsigned getScalarOrVectorComponentCount (Register VReg) const
unsigned getScalarOrVectorComponentCount (SPIRVType *Type) const
SPIRVTypegetScalarOrVectorComponentType (Register VReg) const
SPIRVTypegetScalarOrVectorComponentType (SPIRVType *Type) const
unsigned getScalarOrVectorBitWidth (const SPIRVType *Type) const
unsigned getNumScalarOrVectorTotalBitWidth (const SPIRVType *Type) const
const SPIRVTyperetrieveScalarOrVectorIntType (const SPIRVType *Type) const
bool isScalarOrVectorSigned (const SPIRVType *Type) const
SPIRV::StorageClass::StorageClass getPointerStorageClass (Register VReg) const
SPIRV::StorageClass::StorageClass getPointerStorageClass (const SPIRVType *Type) const
unsigned getPointerSize () const
bool isBitcastCompatible (const SPIRVType *Type1, const SPIRVType *Type2) const
void invalidateMachineInstr (MachineInstr *MI)
Register buildConstantInt (uint64_t Val, MachineIRBuilder &MIRBuilder, SPIRVType *SpvType, bool EmitIR, bool ZeroAsNull=true)
Register getOrCreateConstInt (uint64_t Val, MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register createConstInt (const ConstantInt *CI, MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull)
Register getOrCreateConstFP (APFloat Val, MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register createConstFP (const ConstantFP *CF, MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull)
Register buildConstantFP (APFloat Val, MachineIRBuilder &MIRBuilder, SPIRVType *SpvType=nullptr)
Register getOrCreateConstVector (uint64_t Val, MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register getOrCreateConstVector (APFloat Val, MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register getOrCreateConstIntArray (uint64_t Val, size_t Num, MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII)
Register getOrCreateConsIntVector (uint64_t Val, MachineIRBuilder &MIRBuilder, SPIRVType *SpvType, bool EmitIR)
Register getOrCreateConstNullPtr (MachineIRBuilder &MIRBuilder, SPIRVType *SpvType)
Register buildConstantSampler (Register Res, unsigned AddrMode, unsigned Param, unsigned FilerMode, MachineIRBuilder &MIRBuilder)
Register getOrCreateUndef (MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII)
Register 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)
Register getOrCreateGlobalVariableWithBinding (const SPIRVType *VarType, uint32_t Set, uint32_t Binding, StringRef Name, MachineIRBuilder &MIRBuilder)
SPIRVTypegetOrCreateSPIRVIntegerType (unsigned BitWidth, MachineIRBuilder &MIRBuilder)
SPIRVTypegetOrCreateSPIRVIntegerType (unsigned BitWidth, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypegetOrCreateSPIRVType (unsigned BitWidth, MachineInstr &I, const SPIRVInstrInfo &TII, unsigned SPIRVOPcode, Type *LLVMTy)
SPIRVTypegetOrCreateSPIRVFloatType (unsigned BitWidth, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypegetOrCreateSPIRVBoolType (MachineIRBuilder &MIRBuilder, bool EmitIR)
SPIRVTypegetOrCreateSPIRVBoolType (MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypegetOrCreateSPIRVVectorType (SPIRVType *BaseType, unsigned NumElements, MachineIRBuilder &MIRBuilder, bool EmitIR)
SPIRVTypegetOrCreateSPIRVVectorType (SPIRVType *BaseType, unsigned NumElements, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypegetOrCreateSPIRVPointerType (const Type *BaseType, MachineIRBuilder &MIRBuilder, SPIRV::StorageClass::StorageClass SC)
SPIRVTypegetOrCreateSPIRVPointerType (const Type *BaseType, MachineInstr &I, SPIRV::StorageClass::StorageClass SC)
SPIRVTypegetOrCreateSPIRVPointerType (SPIRVType *BaseType, MachineIRBuilder &MIRBuilder, SPIRV::StorageClass::StorageClass SC)
SPIRVTypechangePointerStorageClass (SPIRVType *PtrType, SPIRV::StorageClass::StorageClass SC, MachineInstr &I)
SPIRVTypegetOrCreateVulkanBufferType (MachineIRBuilder &MIRBuilder, Type *ElemType, SPIRV::StorageClass::StorageClass SC, bool IsWritable, bool EmitIr=false)
SPIRVTypegetOrCreateLayoutType (MachineIRBuilder &MIRBuilder, const TargetExtType *T, bool EmitIr=false)
SPIRVTypegetImageType (const TargetExtType *ExtensionType, const SPIRV::AccessQualifier::AccessQualifier Qualifier, MachineIRBuilder &MIRBuilder)
SPIRVTypegetOrCreateOpTypeSampler (MachineIRBuilder &MIRBuilder)
SPIRVTypegetOrCreateOpTypeSampledImage (SPIRVType *ImageType, MachineIRBuilder &MIRBuilder)
SPIRVTypegetOrCreateOpTypeCoopMatr (MachineIRBuilder &MIRBuilder, const TargetExtType *ExtensionType, const SPIRVType *ElemType, uint32_t Scope, uint32_t Rows, uint32_t Columns, uint32_t Use, bool EmitIR)
SPIRVTypegetOrCreateOpTypePipe (MachineIRBuilder &MIRBuilder, SPIRV::AccessQualifier::AccessQualifier AccQual)
SPIRVTypegetOrCreateOpTypeDeviceEvent (MachineIRBuilder &MIRBuilder)
SPIRVTypegetOrCreateOpTypeFunctionWithArgs (const Type *Ty, SPIRVType *RetType, const SmallVectorImpl< SPIRVType * > &ArgTypes, MachineIRBuilder &MIRBuilder)
SPIRVTypegetOrCreateOpTypeByOpcode (const Type *Ty, MachineIRBuilder &MIRBuilder, unsigned Opcode)
SPIRVTypegetOrCreateUnknownType (const Type *Ty, MachineIRBuilder &MIRBuilder, unsigned Opcode, const ArrayRef< MCOperand > Operands)
const TargetRegisterClassgetRegClass (SPIRVType *SpvType) const
LLT getRegType (SPIRVType *SpvType) const
MachineInstrgetOrAddMemAliasingINTELInst (MachineIRBuilder &MIRBuilder, const MDNode *AliasingListMD)
void buildMemAliasingOpDecorate (Register Reg, MachineIRBuilder &MIRBuilder, uint32_t Dec, const MDNode *GVarMD)
void replaceAllUsesWith (Value *Old, Value *New, bool DeleteOld=true)
void buildAssignType (IRBuilder<> &B, Type *Ty, Value *Arg)
void buildAssignPtr (IRBuilder<> &B, Type *ElemTy, Value *Arg)
void updateAssignType (CallInst *AssignCI, Value *Arg, Value *OfType)
Public Member Functions inherited from llvm::SPIRVIRMapping
bool add (SPIRV::IRHandle Handle, const MachineInstr *MI)
bool erase (const MachineInstr *MI)
const MachineInstrfindMI (SPIRV::IRHandle Handle, const MachineFunction *MF)
Register find (SPIRV::IRHandle Handle, const MachineFunction *MF)
bool add (const Type *PointeeTy, unsigned AddressSpace, const MachineInstr *MI)
Register find (const Type *PointeeTy, unsigned AddressSpace, const MachineFunction *MF)
const MachineInstrfindMI (const Type *PointeeTy, unsigned AddressSpace, const MachineFunction *MF)
bool add (const Value *V, const MachineInstr *MI)
bool add (const Type *T, bool RequiresExplicitLayout, const MachineInstr *MI)
bool add (const MachineInstr *Obj, const MachineInstr *MI)
Register find (const Value *V, const MachineFunction *MF)
Register find (const Type *T, bool RequiresExplicitLayout, const MachineFunction *MF)
Register find (const MachineInstr *MI, const MachineFunction *MF)
const MachineInstrfindMI (const Value *Obj, const MachineFunction *MF)
const MachineInstrfindMI (const Type *T, bool RequiresExplicitLayout, const MachineFunction *MF)
const MachineInstrfindMI (const MachineInstr *Obj, const MachineFunction *MF)

Public Attributes

MachineFunctionCurMF

Detailed Description

Definition at line 31 of file SPIRVGlobalRegistry.h.

Constructor & Destructor Documentation

◆ SPIRVGlobalRegistry()

SPIRVGlobalRegistry::SPIRVGlobalRegistry ( unsigned PointerSize)

Definition at line 89 of file SPIRVGlobalRegistry.cpp.

References CurMF.

Member Function Documentation

◆ addAssignPtrTypeInstr()

void llvm::SPIRVGlobalRegistry::addAssignPtrTypeInstr ( Value * Val,
CallInst * AssignPtrTyCI )
inline

Definition at line 138 of file SPIRVGlobalRegistry.h.

Referenced by buildAssignPtr(), and buildAssignType().

◆ addDeducedCompositeType()

void llvm::SPIRVGlobalRegistry::addDeducedCompositeType ( Value * Val,
Type * Ty )
inline

Definition at line 199 of file SPIRVGlobalRegistry.h.

◆ addDeducedElementType()

void llvm::SPIRVGlobalRegistry::addDeducedElementType ( Value * Val,
Type * Ty )
inline

Definition at line 183 of file SPIRVGlobalRegistry.h.

Referenced by buildAssignPtr(), and updateAssignType().

◆ addForwardCall()

void llvm::SPIRVGlobalRegistry::addForwardCall ( const Function * F,
MachineInstr * MI )
inline

Definition at line 267 of file SPIRVGlobalRegistry.h.

References F, and MI.

Referenced by llvm::SPIRVTargetLowering::finalizeLowering().

◆ addGlobalObject()

void llvm::SPIRVGlobalRegistry::addGlobalObject ( const Value * V,
const MachineFunction * MF,
Register R )
inline

Definition at line 118 of file SPIRVGlobalRegistry.h.

Referenced by addConstantsToTrack(), and buildGlobalVariable().

◆ addMutated()

void llvm::SPIRVGlobalRegistry::addMutated ( Value * Val,
Type * Ty )
inline

Definition at line 159 of file SPIRVGlobalRegistry.h.

◆ addReturnType()

void llvm::SPIRVGlobalRegistry::addReturnType ( const Function * ArgF,
TypedPointerType * DerivedTy )
inline

Definition at line 127 of file SPIRVGlobalRegistry.h.

◆ addValueAttrs()

void llvm::SPIRVGlobalRegistry::addValueAttrs ( MachineInstr * Key,
std::pair< Type *, std::string > Val )
inline

◆ assignFloatTypeToVReg()

SPIRVType * SPIRVGlobalRegistry::assignFloatTypeToVReg ( unsigned BitWidth,
Register VReg,
MachineInstr & I,
const SPIRVInstrInfo & TII )

◆ assignIntTypeToVReg()

SPIRVType * SPIRVGlobalRegistry::assignIntTypeToVReg ( unsigned BitWidth,
Register VReg,
MachineInstr & I,
const SPIRVInstrInfo & TII )

◆ assignSPIRVTypeToVReg()

◆ assignTypeToVReg()

SPIRVType * SPIRVGlobalRegistry::assignTypeToVReg ( const Type * Type,
Register VReg,
MachineIRBuilder & MIRBuilder,
SPIRV::AccessQualifier::AccessQualifier AQ,
bool EmitIR )

◆ assignVectTypeToVReg()

SPIRVType * SPIRVGlobalRegistry::assignVectTypeToVReg ( SPIRVType * BaseType,
unsigned NumElements,
Register VReg,
MachineInstr & I,
const SPIRVInstrInfo & TII )

◆ buildAssignPtr()

◆ buildAssignType()

◆ buildConstantFP()

◆ buildConstantInt()

◆ buildConstantSampler()

◆ buildGlobalVariable()

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 )

◆ buildMemAliasingOpDecorate()

◆ changePointerStorageClass()

SPIRVType * SPIRVGlobalRegistry::changePointerStorageClass ( SPIRVType * PtrType,
SPIRV::StorageClass::StorageClass SC,
MachineInstr & I )

◆ createConstFP()

◆ createConstInt()

◆ findAssignPtrTypeInstr()

CallInst * llvm::SPIRVGlobalRegistry::findAssignPtrTypeInstr ( const Value * Val)
inline

Definition at line 142 of file SPIRVGlobalRegistry.h.

Referenced by buildAssignPtr(), and updateIfExistAssignPtrTypeInstr().

◆ findDeducedCompositeType()

Type * llvm::SPIRVGlobalRegistry::findDeducedCompositeType ( const Value * Val)
inline

Definition at line 203 of file SPIRVGlobalRegistry.h.

Referenced by getDeducedGlobalValueType().

◆ findDeducedElementType()

Type * llvm::SPIRVGlobalRegistry::findDeducedElementType ( const Value * Val)
inline

◆ findMutated()

Type * llvm::SPIRVGlobalRegistry::findMutated ( const Value * Val)
inline

Definition at line 161 of file SPIRVGlobalRegistry.h.

Referenced by restoreMutatedType().

◆ findReturnType()

const TypedPointerType * llvm::SPIRVGlobalRegistry::findReturnType ( const Function * ArgF)
inline

Definition at line 131 of file SPIRVGlobalRegistry.h.

◆ findValueAttrs()

bool llvm::SPIRVGlobalRegistry::findValueAttrs ( const MachineInstr * Key,
Type *& Ty,
StringRef & Name )
inline

◆ getBound()

unsigned llvm::SPIRVGlobalRegistry::getBound ( )
inline

Definition at line 116 of file SPIRVGlobalRegistry.h.

◆ getDeducedGlobalValueType()

Type * llvm::SPIRVGlobalRegistry::getDeducedGlobalValueType ( const GlobalValue * Global)
inline

◆ getForwardCalls()

SmallPtrSet< MachineInstr *, 8 > * llvm::SPIRVGlobalRegistry::getForwardCalls ( const Function * F)
inline

Definition at line 273 of file SPIRVGlobalRegistry.h.

References F.

Referenced by validateForwardCalls().

◆ getFunctionByDefinition()

const Function * llvm::SPIRVGlobalRegistry::getFunctionByDefinition ( const MachineInstr * MI)
inline

Definition at line 244 of file SPIRVGlobalRegistry.h.

References llvm::Function::end(), and MI.

Referenced by validateForwardCalls().

◆ getFunctionDefinition()

const MachineInstr * llvm::SPIRVGlobalRegistry::getFunctionDefinition ( const Function * F)
inline

Definition at line 235 of file SPIRVGlobalRegistry.h.

References F, and llvm::MachineInstr::getParent().

Referenced by validateFunCall().

◆ getFunctionDefinitionByUse()

const MachineOperand * llvm::SPIRVGlobalRegistry::getFunctionDefinitionByUse ( const MachineOperand * Use)
inline

Definition at line 225 of file SPIRVGlobalRegistry.h.

◆ getGlobalObject()

const Value * llvm::SPIRVGlobalRegistry::getGlobalObject ( const MachineFunction * MF,
Register R )
inline

Definition at line 121 of file SPIRVGlobalRegistry.h.

◆ getImageType()

◆ getNumScalarOrVectorTotalBitWidth()

unsigned SPIRVGlobalRegistry::getNumScalarOrVectorTotalBitWidth ( const SPIRVType * Type) const

Definition at line 1310 of file SPIRVGlobalRegistry.cpp.

References assert(), llvm::getImm(), and getSPIRVTypeForVReg().

Referenced by isBitcastCompatible().

◆ getOrAddMemAliasingINTELInst()

◆ getOrCreateConsIntVector()

◆ getOrCreateConstFP()

Register SPIRVGlobalRegistry::getOrCreateConstFP ( APFloat Val,
MachineInstr & I,
SPIRVType * SpvType,
const SPIRVInstrInfo & TII,
bool ZeroAsNull = true )

Definition at line 295 of file SPIRVGlobalRegistry.cpp.

References createConstFP(), CurMF, llvm::SPIRVIRMapping::findMI(), I, MI, and TII.

◆ getOrCreateConstInt()

Register SPIRVGlobalRegistry::getOrCreateConstInt ( uint64_t Val,
MachineInstr & I,
SPIRVType * SpvType,
const SPIRVInstrInfo & TII,
bool ZeroAsNull = true )

◆ getOrCreateConstIntArray()

◆ getOrCreateConstNullPtr()

◆ getOrCreateConstVector() [1/2]

◆ getOrCreateConstVector() [2/2]

◆ getOrCreateGlobalVariableWithBinding()

Register SPIRVGlobalRegistry::getOrCreateGlobalVariableWithBinding ( const SPIRVType * VarType,
uint32_t Set,
uint32_t Binding,
StringRef Name,
MachineIRBuilder & MIRBuilder )

◆ getOrCreateLayoutType()

◆ getOrCreateOpTypeByOpcode()

◆ getOrCreateOpTypeCoopMatr()

◆ getOrCreateOpTypeDeviceEvent()

◆ getOrCreateOpTypeFunctionWithArgs()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeFunctionWithArgs ( const Type * Ty,
SPIRVType * RetType,
const SmallVectorImpl< SPIRVType * > & ArgTypes,
MachineIRBuilder & MIRBuilder )

◆ getOrCreateOpTypePipe()

◆ getOrCreateOpTypeSampledImage()

◆ getOrCreateOpTypeSampler()

◆ getOrCreateSPIRVBoolType() [1/2]

◆ getOrCreateSPIRVBoolType() [2/2]

◆ getOrCreateSPIRVFloatType()

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVFloatType ( unsigned BitWidth,
MachineInstr & I,
const SPIRVInstrInfo & TII )

◆ getOrCreateSPIRVIntegerType() [1/2]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVIntegerType ( unsigned BitWidth,
MachineInstr & I,
const SPIRVInstrInfo & TII )

◆ getOrCreateSPIRVIntegerType() [2/2]

◆ getOrCreateSPIRVPointerType() [1/3]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVPointerType ( const Type * BaseType,
MachineInstr & I,
SPIRV::StorageClass::StorageClass SC )

Definition at line 1798 of file SPIRVGlobalRegistry.cpp.

References getOrCreateSPIRVPointerType(), and I.

◆ getOrCreateSPIRVPointerType() [2/3]

◆ getOrCreateSPIRVPointerType() [3/3]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVPointerType ( SPIRVType * BaseType,
MachineIRBuilder & MIRBuilder,
SPIRV::StorageClass::StorageClass SC )

◆ getOrCreateSPIRVType() [1/3]

◆ getOrCreateSPIRVType() [2/3]

SPIRVType * llvm::SPIRVGlobalRegistry::getOrCreateSPIRVType ( const Type * Type,
MachineIRBuilder & MIRBuilder,
SPIRV::AccessQualifier::AccessQualifier AQ,
bool EmitIR )
inline

Definition at line 309 of file SPIRVGlobalRegistry.h.

References getOrCreateSPIRVType().

◆ getOrCreateSPIRVType() [3/3]

◆ getOrCreateSPIRVTypeByName()

◆ getOrCreateSPIRVVectorType() [1/2]

◆ getOrCreateSPIRVVectorType() [2/2]

◆ getOrCreateUndef()

◆ getOrCreateUnknownType()

◆ getOrCreateVulkanBufferType()

◆ getPointeeType()

◆ getPointeeTypeOp()

unsigned SPIRVGlobalRegistry::getPointeeTypeOp ( Register PtrReg)

◆ getPointerSize()

unsigned llvm::SPIRVGlobalRegistry::getPointerSize ( ) const
inline

◆ getPointerStorageClass() [1/2]

SPIRV::StorageClass::StorageClass SPIRVGlobalRegistry::getPointerStorageClass ( const SPIRVType * Type) const

Definition at line 1375 of file SPIRVGlobalRegistry.cpp.

References llvm::getImm().

◆ getPointerStorageClass() [2/2]

◆ getRegClass()

◆ getRegType()

◆ getResultType()

SPIRVType * SPIRVGlobalRegistry::getResultType ( Register VReg,
MachineFunction * MF = nullptr )

◆ getScalarOrVectorBitWidth()

◆ getScalarOrVectorComponentCount() [1/2]

unsigned SPIRVGlobalRegistry::getScalarOrVectorComponentCount ( Register VReg) const

◆ getScalarOrVectorComponentCount() [2/2]

unsigned SPIRVGlobalRegistry::getScalarOrVectorComponentCount ( SPIRVType * Type) const

Definition at line 1269 of file SPIRVGlobalRegistry.cpp.

References llvm::getImm().

◆ getScalarOrVectorComponentType() [1/2]

SPIRVType * SPIRVGlobalRegistry::getScalarOrVectorComponentType ( Register VReg) const

◆ getScalarOrVectorComponentType() [2/2]

SPIRVType * SPIRVGlobalRegistry::getScalarOrVectorComponentType ( SPIRVType * Type) const

◆ getSPIRVTypeForVReg()

◆ getSPIRVTypeID()

Register SPIRVGlobalRegistry::getSPIRVTypeID ( const SPIRVType * SpirvType) const

Definition at line 1011 of file SPIRVGlobalRegistry.cpp.

References assert(), llvm::iterator_range< IteratorT >::begin(), llvm::MachineInstr::defs(), llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::uses().

Referenced by addConstantsToTrack(), llvm::build2DBlockIOINTELInst(), llvm::buildAtomicCompareExchangeInst(), llvm::buildAtomicFlagInst(), llvm::buildAtomicFloatingRMWInst(), llvm::buildAtomicLoadInst(), llvm::buildAtomicRMWInst(), llvm::buildBindlessImageINTELInst(), buildConstantFP(), buildConstantInt(), buildConstantSampler(), llvm::buildEnqueueKernel(), llvm::buildExtendedBitOpsInst(), buildGlobalVariable(), llvm::buildNDRange(), buildOpBitcast(), llvm::buildTernaryBitwiseFunctionINTELInst(), createConstFP(), createConstInt(), doInsertBitcast(), llvm::generateAsyncCopy(), llvm::generateAtomicInst(), llvm::generateCastToPtrInst(), llvm::generateConstructInst(), llvm::generateConvertInst(), llvm::generateCoopMatrInst(), llvm::generateDotOrFMulInst(), llvm::generateEnqueueInst(), llvm::generateExtInst(), llvm::generateGroupInst(), llvm::generateGroupUniformInst(), llvm::generateICarryBorrowInst(), llvm::generateImageMiscQueryInst(), llvm::generateImageSizeQueryInst(), llvm::generateIntelSubgroupsInst(), llvm::generateKernelClockInst(), llvm::generateLoadStoreInst(), llvm::generateReadImageInst(), llvm::generateRelationalInst(), llvm::generateSampleImageInst(), llvm::generateSpecConstantInst(), llvm::generateVectorLoadStoreInst(), llvm::getInlineSpirvType(), getOrCreateConstNullPtr(), getOrCreateOpTypeCoopMatr(), getOrCreateOpTypeSampledImage(), getOrCreateSPIRVVectorType(), getOrCreateUndef(), llvm::insertAssignInstr(), insertInlineAsmProcess(), llvm::SPIRVTargetLowering::insertLogicalCopyOnResult(), and llvm::SPIRV::lowerBuiltinType().

◆ getTypeForSPIRVType()

◆ hasConstFunPtr()

bool llvm::SPIRVGlobalRegistry::hasConstFunPtr ( )
inline

Definition at line 264 of file SPIRVGlobalRegistry.h.

◆ hasSPIRVTypeForVReg()

bool llvm::SPIRVGlobalRegistry::hasSPIRVTypeForVReg ( Register VReg) const
inline

Definition at line 348 of file SPIRVGlobalRegistry.h.

References getSPIRVTypeForVReg().

◆ invalidateMachineInstr()

◆ isAggregateType()

bool llvm::SPIRVGlobalRegistry::isAggregateType ( SPIRVType * Type) const
inline

Definition at line 363 of file SPIRVGlobalRegistry.h.

◆ isBitcastCompatible()

bool SPIRVGlobalRegistry::isBitcastCompatible ( const SPIRVType * Type1,
const SPIRVType * Type2 ) const

◆ isResourceType()

bool SPIRVGlobalRegistry::isResourceType ( SPIRVType * Type) const

Definition at line 1250 of file SPIRVGlobalRegistry.cpp.

◆ isScalarOfType()

bool SPIRVGlobalRegistry::isScalarOfType ( Register VReg,
unsigned TypeOpcode ) const

◆ isScalarOrVectorOfType()

◆ isScalarOrVectorSigned()

bool SPIRVGlobalRegistry::isScalarOrVectorSigned ( const SPIRVType * Type) const

◆ recordFunctionDefinition()

void llvm::SPIRVGlobalRegistry::recordFunctionDefinition ( const Function * F,
const MachineOperand * MO )
inline

Definition at line 258 of file SPIRVGlobalRegistry.h.

References F, and llvm::MachineOperand::getParent().

◆ recordFunctionPointer()

void llvm::SPIRVGlobalRegistry::recordFunctionPointer ( const MachineOperand * MO,
const Function * F )
inline

Definition at line 253 of file SPIRVGlobalRegistry.h.

References F.

◆ replaceAllUsesWith()

void SPIRVGlobalRegistry::replaceAllUsesWith ( Value * Old,
Value * New,
bool DeleteOld = true )

◆ retrieveScalarOrVectorIntType()

const SPIRVType * SPIRVGlobalRegistry::retrieveScalarOrVectorIntType ( const SPIRVType * Type) const

Definition at line 1324 of file SPIRVGlobalRegistry.cpp.

References getSPIRVTypeForVReg().

Referenced by isBitcastCompatible(), and isScalarOrVectorSigned().

◆ setBound()

void llvm::SPIRVGlobalRegistry::setBound ( unsigned V)
inline

Definition at line 115 of file SPIRVGlobalRegistry.h.

◆ setCurrentFunc()

MachineFunction * llvm::SPIRVGlobalRegistry::setCurrentFunc ( MachineFunction & MF)
inline

◆ updateAssignType()

void SPIRVGlobalRegistry::updateAssignType ( CallInst * AssignCI,
Value * Arg,
Value * OfType )

◆ updateIfExistAssignPtrTypeInstr()

void llvm::SPIRVGlobalRegistry::updateIfExistAssignPtrTypeInstr ( Value * OldVal,
Value * NewVal,
bool DeleteOld )
inline

Definition at line 147 of file SPIRVGlobalRegistry.h.

References findAssignPtrTypeInstr().

Referenced by replaceAllUsesWith().

◆ updateIfExistDeducedElementType()

void llvm::SPIRVGlobalRegistry::updateIfExistDeducedElementType ( Value * OldVal,
Value * NewVal,
bool DeleteOld )
inline

Definition at line 190 of file SPIRVGlobalRegistry.h.

References findDeducedElementType().

Referenced by replaceAllUsesWith().

Member Data Documentation

◆ CurMF


The documentation for this class was generated from the following files: