LLVM 22.0.0git
Public Member Functions | Public Attributes | List of all members
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.

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

◆ addGlobalObject()

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

◆ 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

◆ addValueAttrs()

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

Definition at line 168 of file SPIRVGlobalRegistry.h.

Referenced by generateAssignInstrs().

◆ 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()

void SPIRVGlobalRegistry::assignSPIRVTypeToVReg ( SPIRVType Type,
Register  VReg,
const MachineFunction MF 
)

◆ 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()

void SPIRVGlobalRegistry::buildAssignPtr ( IRBuilder<> &  B,
Type ElemTy,
Value Arg 
)

◆ buildAssignType()

void SPIRVGlobalRegistry::buildAssignType ( IRBuilder<> &  B,
Type Ty,
Value Arg 
)

◆ buildConstantFP()

Register SPIRVGlobalRegistry::buildConstantFP ( APFloat  Val,
MachineIRBuilder MIRBuilder,
SPIRVType SpvType = nullptr 
)

◆ buildConstantInt()

Register SPIRVGlobalRegistry::buildConstantInt ( uint64_t  Val,
MachineIRBuilder MIRBuilder,
SPIRVType SpvType,
bool  EmitIR,
bool  ZeroAsNull = true 
)

◆ buildConstantSampler()

Register SPIRVGlobalRegistry::buildConstantSampler ( Register  Res,
unsigned  AddrMode,
unsigned  Param,
unsigned  FilerMode,
MachineIRBuilder MIRBuilder 
)

◆ 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()

void SPIRVGlobalRegistry::buildMemAliasingOpDecorate ( Register  Reg,
MachineIRBuilder MIRBuilder,
uint32_t  Dec,
const MDNode GVarMD 
)

◆ changePointerStorageClass()

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

◆ createConstFP()

Register SPIRVGlobalRegistry::createConstFP ( const ConstantFP CF,
MachineInstr I,
SPIRVType SpvType,
const SPIRVInstrInfo TII,
bool  ZeroAsNull 
)

◆ createConstInt()

Register SPIRVGlobalRegistry::createConstInt ( const ConstantInt CI,
MachineInstr I,
SPIRVType SpvType,
const SPIRVInstrInfo TII,
bool  ZeroAsNull 
)

◆ findAssignPtrTypeInstr()

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

◆ findDeducedCompositeType()

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

◆ findDeducedElementType()

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

◆ findMutated()

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

◆ findReturnType()

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

◆ 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

◆ getFunctionByDefinition()

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

◆ getFunctionDefinition()

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

◆ getFunctionDefinitionByUse()

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

◆ getGlobalObject()

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

◆ getImageType()

SPIRVType * SPIRVGlobalRegistry::getImageType ( const TargetExtType ExtensionType,
const SPIRV::AccessQualifier::AccessQualifier  Qualifier,
MachineIRBuilder MIRBuilder 
)

◆ getNumScalarOrVectorTotalBitWidth()

unsigned SPIRVGlobalRegistry::getNumScalarOrVectorTotalBitWidth ( const SPIRVType Type) const

Definition at line 1292 of file SPIRVGlobalRegistry.cpp.

References assert(), and getSPIRVTypeForVReg().

Referenced by isBitcastCompatible().

◆ getOrAddMemAliasingINTELInst()

MachineInstr * SPIRVGlobalRegistry::getOrAddMemAliasingINTELInst ( MachineIRBuilder MIRBuilder,
const MDNode AliasingListMD 
)

◆ getOrCreateConsIntVector()

Register SPIRVGlobalRegistry::getOrCreateConsIntVector ( uint64_t  Val,
MachineIRBuilder MIRBuilder,
SPIRVType SpvType,
bool  EmitIR 
)

◆ getOrCreateConstFP()

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

◆ getOrCreateConstInt()

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

◆ getOrCreateConstIntArray()

Register SPIRVGlobalRegistry::getOrCreateConstIntArray ( uint64_t  Val,
size_t  Num,
MachineInstr I,
SPIRVType SpvType,
const SPIRVInstrInfo TII 
)

◆ getOrCreateConstNullPtr()

Register SPIRVGlobalRegistry::getOrCreateConstNullPtr ( MachineIRBuilder MIRBuilder,
SPIRVType SpvType 
)

◆ getOrCreateConstVector() [1/2]

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

◆ getOrCreateConstVector() [2/2]

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

◆ getOrCreateGlobalVariableWithBinding()

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

◆ getOrCreateLayoutType()

SPIRVType * SPIRVGlobalRegistry::getOrCreateLayoutType ( MachineIRBuilder MIRBuilder,
const TargetExtType T,
bool  EmitIr = false 
)

◆ getOrCreateOpTypeByOpcode()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeByOpcode ( const Type Ty,
MachineIRBuilder MIRBuilder,
unsigned  Opcode 
)

◆ getOrCreateOpTypeCoopMatr()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeCoopMatr ( MachineIRBuilder MIRBuilder,
const TargetExtType ExtensionType,
const SPIRVType ElemType,
uint32_t  Scope,
uint32_t  Rows,
uint32_t  Columns,
uint32_t  Use,
bool  EmitIR 
)

◆ getOrCreateOpTypeDeviceEvent()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeDeviceEvent ( MachineIRBuilder MIRBuilder)

◆ getOrCreateOpTypeFunctionWithArgs()

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

◆ getOrCreateOpTypePipe()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypePipe ( MachineIRBuilder MIRBuilder,
SPIRV::AccessQualifier::AccessQualifier  AccQual 
)

◆ getOrCreateOpTypeSampledImage()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeSampledImage ( SPIRVType ImageType,
MachineIRBuilder MIRBuilder 
)

◆ getOrCreateOpTypeSampler()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeSampler ( MachineIRBuilder MIRBuilder)

◆ getOrCreateSPIRVBoolType() [1/2]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVBoolType ( MachineInstr I,
const SPIRVInstrInfo TII 
)

◆ getOrCreateSPIRVBoolType() [2/2]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVBoolType ( MachineIRBuilder MIRBuilder,
bool  EmitIR 
)

◆ 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]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVIntegerType ( unsigned  BitWidth,
MachineIRBuilder MIRBuilder 
)

◆ getOrCreateSPIRVPointerType() [1/3]

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

Definition at line 1780 of file SPIRVGlobalRegistry.cpp.

References getOrCreateSPIRVPointerType(), and I.

◆ getOrCreateSPIRVPointerType() [2/3]

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

◆ getOrCreateSPIRVPointerType() [3/3]

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

◆ getOrCreateSPIRVType() [1/3]

SPIRVType * llvm::SPIRVGlobalRegistry::getOrCreateSPIRVType ( const Type Type,
MachineInstr I,
SPIRV::AccessQualifier::AccessQualifier  AQ,
bool  EmitIR 
)
inline

◆ 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]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVType ( unsigned  BitWidth,
MachineInstr I,
const SPIRVInstrInfo TII,
unsigned  SPIRVOPcode,
Type LLVMTy 
)

◆ getOrCreateSPIRVTypeByName()

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVTypeByName ( StringRef  TypeStr,
MachineIRBuilder MIRBuilder,
bool  EmitIR,
SPIRV::StorageClass::StorageClass  SC = SPIRV::StorageClass::Function,
SPIRV::AccessQualifier::AccessQualifier  AQ = SPIRV::AccessQualifier::ReadWrite 
)

◆ getOrCreateSPIRVVectorType() [1/2]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVVectorType ( SPIRVType BaseType,
unsigned  NumElements,
MachineInstr I,
const SPIRVInstrInfo TII 
)

◆ getOrCreateSPIRVVectorType() [2/2]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVVectorType ( SPIRVType BaseType,
unsigned  NumElements,
MachineIRBuilder MIRBuilder,
bool  EmitIR 
)

◆ getOrCreateUndef()

Register SPIRVGlobalRegistry::getOrCreateUndef ( MachineInstr I,
SPIRVType SpvType,
const SPIRVInstrInfo TII 
)

◆ getOrCreateUnknownType()

SPIRVType * SPIRVGlobalRegistry::getOrCreateUnknownType ( const Type Ty,
MachineIRBuilder MIRBuilder,
unsigned  Opcode,
const ArrayRef< MCOperand Operands 
)

◆ getOrCreateVulkanBufferType()

SPIRVType * SPIRVGlobalRegistry::getOrCreateVulkanBufferType ( MachineIRBuilder MIRBuilder,
Type ElemType,
SPIRV::StorageClass::StorageClass  SC,
bool  IsWritable,
bool  EmitIr = false 
)

◆ getPointeeType()

SPIRVType * SPIRVGlobalRegistry::getPointeeType ( SPIRVType PtrType)

◆ 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 1357 of file SPIRVGlobalRegistry.cpp.

◆ getPointerStorageClass() [2/2]

SPIRV::StorageClass::StorageClass SPIRVGlobalRegistry::getPointerStorageClass ( Register  VReg) const

◆ getRegClass()

const TargetRegisterClass * SPIRVGlobalRegistry::getRegClass ( SPIRVType SpvType) const

◆ getRegType()

LLT SPIRVGlobalRegistry::getRegType ( SPIRVType SpvType) const

◆ getResultType()

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

◆ getScalarOrVectorBitWidth()

unsigned SPIRVGlobalRegistry::getScalarOrVectorBitWidth ( const SPIRVType Type) const

◆ getScalarOrVectorComponentCount() [1/2]

unsigned SPIRVGlobalRegistry::getScalarOrVectorComponentCount ( Register  VReg) const

◆ getScalarOrVectorComponentCount() [2/2]

unsigned SPIRVGlobalRegistry::getScalarOrVectorComponentCount ( SPIRVType Type) const

Definition at line 1251 of file SPIRVGlobalRegistry.cpp.

◆ getScalarOrVectorComponentType() [1/2]

SPIRVType * SPIRVGlobalRegistry::getScalarOrVectorComponentType ( Register  VReg) const

◆ getScalarOrVectorComponentType() [2/2]

SPIRVType * SPIRVGlobalRegistry::getScalarOrVectorComponentType ( SPIRVType Type) const

◆ getSPIRVTypeForVReg()

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

◆ getSPIRVTypeID()

Register SPIRVGlobalRegistry::getSPIRVTypeID ( const SPIRVType SpirvType) const

Definition at line 999 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(), 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(), llvm::SPIRV::lowerBuiltinType(), llvm::SPIRVCallLowering::lowerCall(), and llvm::SPIRVCallLowering::lowerFormalArguments().

◆ getTypeForSPIRVType()

const Type * llvm::SPIRVGlobalRegistry::getTypeForSPIRVType ( const SPIRVType Ty) const
inline

◆ hasConstFunPtr()

bool llvm::SPIRVGlobalRegistry::hasConstFunPtr ( )
inline

◆ hasSPIRVTypeForVReg()

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

Definition at line 348 of file SPIRVGlobalRegistry.h.

References getSPIRVTypeForVReg().

◆ invalidateMachineInstr()

void SPIRVGlobalRegistry::invalidateMachineInstr ( MachineInstr MI)

◆ 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 1232 of file SPIRVGlobalRegistry.cpp.

◆ isScalarOfType()

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

◆ isScalarOrVectorOfType()

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

◆ isScalarOrVectorSigned()

bool SPIRVGlobalRegistry::isScalarOrVectorSigned ( const SPIRVType Type) const

◆ recordFunctionDefinition()

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

◆ 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 1306 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.

Referenced by llvm::SPIRVModuleAnalysis::runOnModule().

◆ 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

◆ updateIfExistDeducedElementType()

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

Member Data Documentation

◆ CurMF

MachineFunction* llvm::SPIRVGlobalRegistry::CurMF

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