LLVM 23.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)
SPIRVTypeInst assignTypeToVReg (const Type *Type, Register VReg, MachineIRBuilder &MIRBuilder, SPIRV::AccessQualifier::AccessQualifier AQ, bool EmitIR)
SPIRVTypeInst assignIntTypeToVReg (unsigned BitWidth, Register VReg, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypeInst assignFloatTypeToVReg (unsigned BitWidth, Register VReg, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypeInst assignVectTypeToVReg (SPIRVTypeInst BaseType, unsigned NumElements, Register VReg, MachineInstr &I, const SPIRVInstrInfo &TII)
void assignSPIRVTypeToVReg (SPIRVTypeInst Type, Register VReg, const MachineFunction &MF)
SPIRVTypeInst getOrCreateSPIRVType (const Type *Type, MachineInstr &I, SPIRV::AccessQualifier::AccessQualifier AQ, bool EmitIR)
SPIRVTypeInst getOrCreateSPIRVType (const Type *Type, MachineIRBuilder &MIRBuilder, SPIRV::AccessQualifier::AccessQualifier AQ, bool EmitIR)
const TypegetTypeForSPIRVType (SPIRVTypeInst Ty) const
SPIRVTypeInst getPointeeType (SPIRVTypeInst PtrType)
unsigned getPointeeTypeOp (Register PtrReg)
SPIRVTypeInst getOrCreateSPIRVTypeByName (StringRef TypeStr, MachineIRBuilder &MIRBuilder, bool EmitIR, SPIRV::StorageClass::StorageClass SC=SPIRV::StorageClass::Function, SPIRV::AccessQualifier::AccessQualifier AQ=SPIRV::AccessQualifier::ReadWrite)
SPIRVTypeInst getSPIRVTypeForVReg (Register VReg, const MachineFunction *MF=nullptr) const
SPIRVTypeInst getResultType (Register VReg, MachineFunction *MF=nullptr)
bool hasSPIRVTypeForVReg (Register VReg) const
Register getSPIRVTypeID (SPIRVTypeInst SpirvType) const
MachineFunctionsetCurrentFunc (MachineFunction &MF)
bool isAggregateType (SPIRVTypeInst Type) const
bool isScalarOfType (Register VReg, unsigned TypeOpcode) const
bool isScalarOrVectorOfType (Register VReg, unsigned TypeOpcode) const
bool isResourceType (SPIRVTypeInst Type) const
unsigned getScalarOrVectorComponentCount (Register VReg) const
unsigned getScalarOrVectorComponentCount (SPIRVTypeInst Type) const
SPIRVTypeInst getScalarOrVectorComponentType (SPIRVTypeInst Type) const
unsigned getScalarOrVectorBitWidth (SPIRVTypeInst Type) const
unsigned getNumScalarOrVectorTotalBitWidth (SPIRVTypeInst Type) const
SPIRVTypeInst retrieveScalarOrVectorIntType (SPIRVTypeInst Type) const
bool isScalarOrVectorSigned (SPIRVTypeInst Type) const
SPIRV::StorageClass::StorageClass getPointerStorageClass (Register VReg) const
SPIRV::StorageClass::StorageClass getPointerStorageClass (SPIRVTypeInst Type) const
unsigned getPointerSize () const
bool isBitcastCompatible (SPIRVTypeInst Type1, SPIRVTypeInst Type2) const
void invalidateMachineInstr (MachineInstr *MI)
Register buildConstantInt (uint64_t Val, MachineIRBuilder &MIRBuilder, SPIRVTypeInst SpvType, bool EmitIR, bool ZeroAsNull=true)
Register getOrCreateConstInt (uint64_t Val, MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register getOrCreateConstInt (const APInt &Val, MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register createConstInt (const ConstantInt *CI, MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull)
Register getOrCreateConstFP (APFloat Val, MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register createConstFP (const ConstantFP *CF, MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull)
Register buildConstantFP (APFloat Val, MachineIRBuilder &MIRBuilder, SPIRVTypeInst SpvType=nullptr)
Register getOrCreateConstVector (uint64_t Val, MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register getOrCreateConstVector (const APInt &Val, MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register getOrCreateConstVector (APFloat Val, MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
Register getOrCreateConstIntArray (uint64_t Val, size_t Num, MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII)
Register getOrCreateConsIntVector (uint64_t Val, MachineIRBuilder &MIRBuilder, SPIRVTypeInst SpvType, bool EmitIR)
Register getOrCreateConstNullPtr (MachineIRBuilder &MIRBuilder, SPIRVTypeInst SpvType)
Register buildConstantSampler (Register Res, unsigned AddrMode, unsigned Param, unsigned FilerMode, MachineIRBuilder &MIRBuilder)
Register getOrCreateUndef (MachineInstr &I, SPIRVTypeInst SpvType, const SPIRVInstrInfo &TII)
Register buildGlobalVariable (Register Reg, SPIRVTypeInst BaseType, StringRef Name, const GlobalValue *GV, SPIRV::StorageClass::StorageClass Storage, const MachineInstr *Init, bool IsConst, const std::optional< SPIRV::LinkageType::LinkageType > &LinkageType, MachineIRBuilder &MIRBuilder, bool IsInstSelector)
Register getOrCreateGlobalVariableWithBinding (SPIRVTypeInst VarType, uint32_t Set, uint32_t Binding, StringRef Name, MachineIRBuilder &MIRBuilder)
SPIRVTypeInst getOrCreateSPIRVIntegerType (unsigned BitWidth, MachineIRBuilder &MIRBuilder)
SPIRVTypeInst getOrCreateSPIRVIntegerType (unsigned BitWidth, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypeInst getOrCreateSPIRVType (unsigned BitWidth, MachineInstr &I, const SPIRVInstrInfo &TII, unsigned SPIRVOPcode, Type *LLVMTy)
SPIRVTypeInst getOrCreateSPIRVFloatType (unsigned BitWidth, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypeInst getOrCreateSPIRVBoolType (MachineIRBuilder &MIRBuilder, bool EmitIR)
SPIRVTypeInst getOrCreateSPIRVBoolType (MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypeInst getOrCreateSPIRVVectorType (SPIRVTypeInst BaseType, unsigned NumElements, MachineIRBuilder &MIRBuilder, bool EmitIR)
SPIRVTypeInst getOrCreateSPIRVVectorType (SPIRVTypeInst BaseType, unsigned NumElements, MachineInstr &I, const SPIRVInstrInfo &TII)
SPIRVTypeInst getOrCreateSPIRVPointerType (const Type *BaseType, MachineIRBuilder &MIRBuilder, SPIRV::StorageClass::StorageClass SC)
SPIRVTypeInst getOrCreateSPIRVPointerType (const Type *BaseType, MachineInstr &I, SPIRV::StorageClass::StorageClass SC)
SPIRVTypeInst getOrCreateSPIRVPointerType (SPIRVTypeInst BaseType, MachineIRBuilder &MIRBuilder, SPIRV::StorageClass::StorageClass SC)
SPIRVTypeInst changePointerStorageClass (SPIRVTypeInst PtrType, SPIRV::StorageClass::StorageClass SC, MachineInstr &I)
SPIRVTypeInst getOrCreateVulkanBufferType (MachineIRBuilder &MIRBuilder, Type *ElemType, SPIRV::StorageClass::StorageClass SC, bool IsWritable, bool EmitIr=false)
SPIRVTypeInst getOrCreatePaddingType (MachineIRBuilder &MIRBuilder)
SPIRVTypeInst getOrCreateVulkanPushConstantType (MachineIRBuilder &MIRBuilder, Type *ElemType)
SPIRVTypeInst getOrCreateLayoutType (MachineIRBuilder &MIRBuilder, const TargetExtType *T, bool EmitIr=false)
SPIRVTypeInst getImageType (const TargetExtType *ExtensionType, const SPIRV::AccessQualifier::AccessQualifier Qualifier, MachineIRBuilder &MIRBuilder)
SPIRVTypeInst getOrCreateOpTypeSampler (MachineIRBuilder &MIRBuilder)
SPIRVTypeInst getOrCreateOpTypeSampledImage (SPIRVTypeInst ImageType, MachineIRBuilder &MIRBuilder)
SPIRVTypeInst getOrCreateOpTypeCoopMatr (MachineIRBuilder &MIRBuilder, const TargetExtType *ExtensionType, SPIRVTypeInst ElemType, uint32_t Scope, uint32_t Rows, uint32_t Columns, uint32_t Use, bool EmitIR)
SPIRVTypeInst getOrCreateOpTypePipe (MachineIRBuilder &MIRBuilder, SPIRV::AccessQualifier::AccessQualifier AccQual)
SPIRVTypeInst getOrCreateOpTypeDeviceEvent (MachineIRBuilder &MIRBuilder)
SPIRVTypeInst getOrCreateOpTypeFunctionWithArgs (const Type *Ty, SPIRVTypeInst RetType, const SmallVectorImpl< SPIRVTypeInst > &ArgTypes, MachineIRBuilder &MIRBuilder)
SPIRVTypeInst getOrCreateOpTypeByOpcode (const Type *Ty, MachineIRBuilder &MIRBuilder, unsigned Opcode)
SPIRVTypeInst getOrCreateUnknownType (const Type *Ty, MachineIRBuilder &MIRBuilder, unsigned Opcode, const ArrayRef< MCOperand > Operands)
const TargetRegisterClassgetRegClass (SPIRVTypeInst SpvType) const
LLT getRegType (SPIRVTypeInst 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 32 of file SPIRVGlobalRegistry.h.

Constructor & Destructor Documentation

◆ SPIRVGlobalRegistry()

SPIRVGlobalRegistry::SPIRVGlobalRegistry ( unsigned PointerSize)

Definition at line 91 of file SPIRVGlobalRegistry.cpp.

References CurMF.

Member Function Documentation

◆ addAssignPtrTypeInstr()

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

Definition at line 142 of file SPIRVGlobalRegistry.h.

Referenced by buildAssignPtr(), and buildAssignType().

◆ addDeducedCompositeType()

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

Definition at line 203 of file SPIRVGlobalRegistry.h.

◆ addDeducedElementType()

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

Definition at line 187 of file SPIRVGlobalRegistry.h.

Referenced by buildAssignPtr(), and updateAssignType().

◆ addForwardCall()

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

Definition at line 273 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 122 of file SPIRVGlobalRegistry.h.

Referenced by addConstantsToTrack(), and buildGlobalVariable().

◆ addMutated()

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

Definition at line 163 of file SPIRVGlobalRegistry.h.

◆ addReturnType()

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

Definition at line 131 of file SPIRVGlobalRegistry.h.

◆ addValueAttrs()

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

◆ assignFloatTypeToVReg()

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

◆ assignIntTypeToVReg()

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

◆ assignSPIRVTypeToVReg()

◆ assignTypeToVReg()

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

◆ assignVectTypeToVReg()

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

◆ buildAssignPtr()

◆ buildAssignType()

◆ buildConstantFP()

◆ buildConstantInt()

◆ buildConstantSampler()

◆ buildGlobalVariable()

◆ buildMemAliasingOpDecorate()

◆ changePointerStorageClass()

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

◆ createConstFP()

◆ createConstInt()

◆ findAssignPtrTypeInstr()

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

Definition at line 146 of file SPIRVGlobalRegistry.h.

Referenced by buildAssignPtr(), and updateIfExistAssignPtrTypeInstr().

◆ findDeducedCompositeType()

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

Definition at line 207 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 165 of file SPIRVGlobalRegistry.h.

Referenced by restoreMutatedType().

◆ findReturnType()

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

Definition at line 135 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 120 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 279 of file SPIRVGlobalRegistry.h.

References F.

Referenced by validateForwardCalls().

◆ getFunctionByDefinition()

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

Definition at line 250 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 241 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 231 of file SPIRVGlobalRegistry.h.

◆ getGlobalObject()

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

Definition at line 125 of file SPIRVGlobalRegistry.h.

◆ getImageType()

◆ getNumScalarOrVectorTotalBitWidth()

unsigned SPIRVGlobalRegistry::getNumScalarOrVectorTotalBitWidth ( SPIRVTypeInst Type) const

Definition at line 1422 of file SPIRVGlobalRegistry.cpp.

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

Referenced by isBitcastCompatible().

◆ getOrAddMemAliasingINTELInst()

◆ getOrCreateConsIntVector()

◆ getOrCreateConstFP()

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

Definition at line 334 of file SPIRVGlobalRegistry.cpp.

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

◆ getOrCreateConstInt() [1/2]

Register SPIRVGlobalRegistry::getOrCreateConstInt ( const APInt & Val,
MachineInstr & I,
SPIRVTypeInst SpvType,
const SPIRVInstrInfo & TII,
bool ZeroAsNull = true )

◆ getOrCreateConstInt() [2/2]

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

Definition at line 387 of file SPIRVGlobalRegistry.cpp.

References getOrCreateConstInt(), getScalarOrVectorBitWidth(), I, and TII.

Referenced by getOrCreateConstInt().

◆ getOrCreateConstIntArray()

◆ getOrCreateConstNullPtr()

◆ getOrCreateConstVector() [1/3]

◆ getOrCreateConstVector() [2/3]

◆ getOrCreateConstVector() [3/3]

Register SPIRVGlobalRegistry::getOrCreateConstVector ( uint64_t Val,
MachineInstr & I,
SPIRVTypeInst SpvType,
const SPIRVInstrInfo & TII,
bool ZeroAsNull = true )

Definition at line 597 of file SPIRVGlobalRegistry.cpp.

References getOrCreateConstVector(), getScalarOrVectorBitWidth(), I, and TII.

Referenced by getOrCreateConstVector().

◆ getOrCreateGlobalVariableWithBinding()

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

◆ getOrCreateLayoutType()

◆ getOrCreateOpTypeByOpcode()

◆ getOrCreateOpTypeCoopMatr()

◆ getOrCreateOpTypeDeviceEvent()

◆ getOrCreateOpTypeFunctionWithArgs()

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

◆ getOrCreateOpTypePipe()

◆ getOrCreateOpTypeSampledImage()

◆ getOrCreateOpTypeSampler()

◆ getOrCreatePaddingType()

◆ getOrCreateSPIRVBoolType() [1/2]

◆ getOrCreateSPIRVBoolType() [2/2]

◆ getOrCreateSPIRVFloatType()

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

◆ getOrCreateSPIRVIntegerType() [1/2]

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

◆ getOrCreateSPIRVIntegerType() [2/2]

◆ getOrCreateSPIRVPointerType() [1/3]

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

Definition at line 1951 of file SPIRVGlobalRegistry.cpp.

References getOrCreateSPIRVPointerType(), and I.

◆ getOrCreateSPIRVPointerType() [2/3]

◆ getOrCreateSPIRVPointerType() [3/3]

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

◆ getOrCreateSPIRVType() [1/3]

◆ getOrCreateSPIRVType() [2/3]

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

Definition at line 317 of file SPIRVGlobalRegistry.h.

References getOrCreateSPIRVType().

◆ getOrCreateSPIRVType() [3/3]

◆ getOrCreateSPIRVTypeByName()

◆ getOrCreateSPIRVVectorType() [1/2]

◆ getOrCreateSPIRVVectorType() [2/2]

◆ getOrCreateUndef()

◆ getOrCreateUnknownType()

◆ getOrCreateVulkanBufferType()

◆ getOrCreateVulkanPushConstantType()

◆ getPointeeType()

◆ getPointeeTypeOp()

unsigned SPIRVGlobalRegistry::getPointeeTypeOp ( Register PtrReg)

◆ getPointerSize()

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

◆ getPointerStorageClass() [1/2]

◆ getPointerStorageClass() [2/2]

SPIRV::StorageClass::StorageClass SPIRVGlobalRegistry::getPointerStorageClass ( SPIRVTypeInst Type) const

Definition at line 1487 of file SPIRVGlobalRegistry.cpp.

References llvm::getImm().

◆ getRegClass()

◆ getRegType()

◆ getResultType()

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

◆ getScalarOrVectorBitWidth()

◆ getScalarOrVectorComponentCount() [1/2]

unsigned SPIRVGlobalRegistry::getScalarOrVectorComponentCount ( Register VReg) const

◆ getScalarOrVectorComponentCount() [2/2]

unsigned SPIRVGlobalRegistry::getScalarOrVectorComponentCount ( SPIRVTypeInst Type) const

Definition at line 1386 of file SPIRVGlobalRegistry.cpp.

References llvm::getImm().

◆ getScalarOrVectorComponentType()

◆ getSPIRVTypeForVReg()

SPIRVTypeInst SPIRVGlobalRegistry::getSPIRVTypeForVReg ( Register VReg,
const MachineFunction * MF = nullptr ) const

Definition at line 1280 of file SPIRVGlobalRegistry.cpp.

References CurMF.

Referenced by llvm::buildAPFixedPointInst(), llvm::buildAtomicCompareExchangeInst(), buildGlobalVariable(), llvm::buildNDRange(), buildOpBitcast(), createStackTemporaryForVector(), deduceAndAssignTypeForGUnmerge(), deduceGEPType(), deducePointerTypeFromResultRegister(), deduceTypeFromPointerOperand(), deduceTypeFromResultRegister(), deduceTypeFromSingleOperand(), ensureAssignTypeForTypeFolding(), llvm::SPIRVTargetLowering::finalizeLowering(), llvm::generateAFPInst(), generateAssignInstrs(), llvm::generateCoopMatrInst(), llvm::generateDotOrFMulInst(), llvm::generateGroupInst(), llvm::generateICarryBorrowInst(), llvm::generateImageMiscQueryInst(), llvm::generateImageSizeQueryInst(), llvm::generateIntelSubgroupsInst(), llvm::generateReadImageInst(), llvm::generateSampleImageInst(), llvm::genWorkgroupQuery(), llvm::getBuiltinCallArguments(), getNumScalarOrVectorTotalBitWidth(), getOrCreateConstIntArray(), getPointeeType(), getPointeeTypeOp(), getPointerStorageClass(), getRegClass(), getRegType(), getResultType(), getScalarOrVectorBitWidth(), getScalarOrVectorComponentCount(), getScalarOrVectorComponentType(), hasSPIRVTypeForVReg(), insertBitcasts(), isScalarOfType(), isScalarOrVectorOfType(), legalizeSpvConstComposite(), legalizeSpvExtractElt(), legalizeSpvInsertElt(), lowerBitcasts(), llvm::SPIRV::lowerBuiltin(), llvm::processInstr(), propagateSPIRVType(), registerSpirvTypeForNewInstructions(), requiresSpirvType(), retrieveScalarOrVectorIntType(), llvm::setRegClassIfNull(), typesLogicallyMatch(), validateAccessChain(), validateFunCallMachineDef(), validateGroupWaitEventsPtr(), validateLifetimeStart(), validatePtrTypes(), and validatePtrUnwrapStructField().

◆ getSPIRVTypeID()

Register SPIRVGlobalRegistry::getSPIRVTypeID ( SPIRVTypeInst SpirvType) const

Definition at line 1122 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::buildAPFixedPointInst(), llvm::buildAtomicCompareExchangeInst(), llvm::buildAtomicFlagInst(), llvm::buildAtomicFloatingRMWInst(), llvm::buildAtomicLoadInst(), llvm::buildAtomicRMWInst(), llvm::buildBindlessImageINTELInst(), buildConstantFP(), buildConstantInt(), buildConstantSampler(), llvm::buildEnqueueKernel(), llvm::buildExtendedBitOpsInst(), buildGlobalVariable(), llvm::buildImageChannelDataTypeInst(), llvm::buildNDRange(), buildOpBitcast(), llvm::buildPipeInst(), llvm::buildTernaryBitwiseFunctionINTELInst(), createConstFP(), createConstInt(), doInsertBitcast(), llvm::generateAFPInst(), generateAssignType(), 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::generatePredicatedLoadStoreInst(), llvm::generateReadImageInst(), llvm::generateRelationalInst(), llvm::generateSampleImageInst(), llvm::generateSpecConstantInst(), llvm::generateVectorLoadStoreInst(), llvm::getBuiltinCallArguments(), llvm::getInlineSpirvType(), getOrCreateConstNullPtr(), getOrCreateOpTypeCoopMatr(), getOrCreateOpTypeSampledImage(), getOrCreateSPIRVVectorType(), getOrCreateUndef(), insertInlineAsmProcess(), llvm::SPIRVTargetLowering::insertLogicalCopyOnResult(), and llvm::SPIRV::lowerBuiltinType().

◆ getTypeForSPIRVType()

◆ hasConstFunPtr()

bool llvm::SPIRVGlobalRegistry::hasConstFunPtr ( )
inline

Definition at line 270 of file SPIRVGlobalRegistry.h.

◆ hasSPIRVTypeForVReg()

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

Definition at line 356 of file SPIRVGlobalRegistry.h.

References getSPIRVTypeForVReg().

◆ invalidateMachineInstr()

◆ isAggregateType()

bool llvm::SPIRVGlobalRegistry::isAggregateType ( SPIRVTypeInst Type) const
inline

Definition at line 371 of file SPIRVGlobalRegistry.h.

◆ isBitcastCompatible()

bool SPIRVGlobalRegistry::isBitcastCompatible ( SPIRVTypeInst Type1,
SPIRVTypeInst Type2 ) const

◆ isResourceType()

bool SPIRVGlobalRegistry::isResourceType ( SPIRVTypeInst Type) const

Definition at line 1367 of file SPIRVGlobalRegistry.cpp.

◆ isScalarOfType()

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

◆ isScalarOrVectorOfType()

◆ isScalarOrVectorSigned()

bool SPIRVGlobalRegistry::isScalarOrVectorSigned ( SPIRVTypeInst Type) const

◆ recordFunctionDefinition()

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

Definition at line 264 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 259 of file SPIRVGlobalRegistry.h.

References F.

◆ replaceAllUsesWith()

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

◆ retrieveScalarOrVectorIntType()

SPIRVTypeInst SPIRVGlobalRegistry::retrieveScalarOrVectorIntType ( SPIRVTypeInst Type) const

Definition at line 1437 of file SPIRVGlobalRegistry.cpp.

References getSPIRVTypeForVReg().

Referenced by isBitcastCompatible(), and isScalarOrVectorSigned().

◆ setBound()

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

Definition at line 119 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 151 of file SPIRVGlobalRegistry.h.

References findAssignPtrTypeInstr().

Referenced by replaceAllUsesWith().

◆ updateIfExistDeducedElementType()

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

Definition at line 194 of file SPIRVGlobalRegistry.h.

References findDeducedElementType().

Referenced by replaceAllUsesWith().

Member Data Documentation

◆ CurMF


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