LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::SPIRVGlobalRegistry Class Reference

#include "Target/SPIRV/SPIRVGlobalRegistry.h"

Public Member Functions

 SPIRVGlobalRegistry (unsigned PointerSize)
 
void add (const Constant *C, MachineFunction *MF, Register R)
 
void add (const GlobalVariable *GV, MachineFunction *MF, Register R)
 
void add (const Function *F, MachineFunction *MF, Register R)
 
void add (const Argument *Arg, MachineFunction *MF, Register R)
 
void add (const MachineInstr *MI, MachineFunction *MF, Register R)
 
Register find (const MachineInstr *MI, MachineFunction *MF)
 
Register find (const Constant *C, MachineFunction *MF)
 
Register find (const GlobalVariable *GV, MachineFunction *MF)
 
Register find (const Function *F, MachineFunction *MF)
 
void buildDepsGraph (std::vector< SPIRV::DTSortableEntry * > &Graph, const SPIRVInstrInfo *TII, MachineModuleInfo *MMI=nullptr)
 
void setBound (unsigned V)
 
unsigned getBound ()
 
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=SPIRV::AccessQualifier::ReadWrite, bool EmitIR=true)
 
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, MachineIRBuilder &MIRBuilder, SPIRV::AccessQualifier::AccessQualifier AQ=SPIRV::AccessQualifier::ReadWrite, bool EmitIR=true)
 
const TypegetTypeForSPIRVType (const SPIRVType *Ty) const
 
SPIRVTypegetPointeeType (SPIRVType *PtrType)
 
unsigned getPointeeTypeOp (Register PtrReg)
 
SPIRVTypegetOrCreateSPIRVTypeByName (StringRef TypeStr, MachineIRBuilder &MIRBuilder, 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)
 
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
 
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=true, bool ZeroAsNull=true)
 
Register getOrCreateConstInt (uint64_t Val, MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
 
Register getOrCreateConstFP (APFloat Val, MachineInstr &I, SPIRVType *SpvType, const SPIRVInstrInfo &TII, bool ZeroAsNull=true)
 
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=true)
 
Register getOrCreateConstNullPtr (MachineIRBuilder &MIRBuilder, SPIRVType *SpvType)
 
Register buildConstantSampler (Register Res, unsigned AddrMode, unsigned Param, unsigned FilerMode, MachineIRBuilder &MIRBuilder, SPIRVType *SpvType)
 
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, 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)
 
SPIRVTypegetOrCreateSPIRVBoolType (MachineInstr &I, const SPIRVInstrInfo &TII)
 
SPIRVTypegetOrCreateSPIRVVectorType (SPIRVType *BaseType, unsigned NumElements, MachineIRBuilder &MIRBuilder)
 
SPIRVTypegetOrCreateSPIRVVectorType (SPIRVType *BaseType, unsigned NumElements, MachineInstr &I, const SPIRVInstrInfo &TII)
 
SPIRVTypegetOrCreateSPIRVArrayType (SPIRVType *BaseType, unsigned NumElements, MachineInstr &I, const SPIRVInstrInfo &TII)
 
SPIRVTypegetOrCreateSPIRVPointerType (SPIRVType *BaseType, MachineIRBuilder &MIRBuilder, SPIRV::StorageClass::StorageClass SClass=SPIRV::StorageClass::Function)
 
SPIRVTypegetOrCreateSPIRVPointerType (SPIRVType *BaseType, MachineInstr &I, const SPIRVInstrInfo &TII, SPIRV::StorageClass::StorageClass SClass=SPIRV::StorageClass::Function)
 
SPIRVTypegetOrCreateOpTypeImage (MachineIRBuilder &MIRBuilder, SPIRVType *SampledType, SPIRV::Dim::Dim Dim, uint32_t Depth, uint32_t Arrayed, uint32_t Multisampled, uint32_t Sampled, SPIRV::ImageFormat::ImageFormat ImageFormat, SPIRV::AccessQualifier::AccessQualifier AccQual)
 
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)
 
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)
 
const TargetRegisterClassgetRegClass (SPIRVType *SpvType) const
 
LLT getRegType (SPIRVType *SpvType) const
 

Public Attributes

MachineFunctionCurMF
 

Detailed Description

Definition at line 30 of file SPIRVGlobalRegistry.h.

Constructor & Destructor Documentation

◆ SPIRVGlobalRegistry()

SPIRVGlobalRegistry::SPIRVGlobalRegistry ( unsigned  PointerSize)

Definition at line 43 of file SPIRVGlobalRegistry.cpp.

Member Function Documentation

◆ add() [1/5]

void llvm::SPIRVGlobalRegistry::add ( const Argument Arg,
MachineFunction MF,
Register  R 
)
inline

Definition at line 130 of file SPIRVGlobalRegistry.h.

◆ add() [2/5]

void llvm::SPIRVGlobalRegistry::add ( const Constant C,
MachineFunction MF,
Register  R 
)
inline

◆ add() [3/5]

void llvm::SPIRVGlobalRegistry::add ( const Function F,
MachineFunction MF,
Register  R 
)
inline

Definition at line 126 of file SPIRVGlobalRegistry.h.

References F.

◆ add() [4/5]

void llvm::SPIRVGlobalRegistry::add ( const GlobalVariable GV,
MachineFunction MF,
Register  R 
)
inline

Definition at line 122 of file SPIRVGlobalRegistry.h.

◆ add() [5/5]

void llvm::SPIRVGlobalRegistry::add ( const MachineInstr MI,
MachineFunction MF,
Register  R 
)
inline

Definition at line 134 of file SPIRVGlobalRegistry.h.

References MI.

◆ addAssignPtrTypeInstr()

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

Definition at line 175 of file SPIRVGlobalRegistry.h.

◆ addDeducedCompositeType()

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

Definition at line 236 of file SPIRVGlobalRegistry.h.

◆ addDeducedElementType()

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

Definition at line 220 of file SPIRVGlobalRegistry.h.

◆ addForwardCall()

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

◆ addMutated()

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

Definition at line 196 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 205 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 = SPIRV::AccessQualifier::ReadWrite,
bool  EmitIR = true 
)

◆ assignVectTypeToVReg()

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

◆ buildConstantFP()

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

◆ buildConstantInt()

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

◆ buildConstantSampler()

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

◆ buildDepsGraph()

void llvm::SPIRVGlobalRegistry::buildDepsGraph ( std::vector< SPIRV::DTSortableEntry * > &  Graph,
const SPIRVInstrInfo TII,
MachineModuleInfo MMI = nullptr 
)
inline

Definition at line 154 of file SPIRVGlobalRegistry.h.

References TII.

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

◆ find() [1/4]

Register llvm::SPIRVGlobalRegistry::find ( const Constant C,
MachineFunction MF 
)
inline

Definition at line 142 of file SPIRVGlobalRegistry.h.

References llvm::CallingConv::C.

◆ find() [2/4]

Register llvm::SPIRVGlobalRegistry::find ( const Function F,
MachineFunction MF 
)
inline

Definition at line 150 of file SPIRVGlobalRegistry.h.

References F.

◆ find() [3/4]

Register llvm::SPIRVGlobalRegistry::find ( const GlobalVariable GV,
MachineFunction MF 
)
inline

Definition at line 146 of file SPIRVGlobalRegistry.h.

◆ find() [4/4]

Register llvm::SPIRVGlobalRegistry::find ( const MachineInstr MI,
MachineFunction MF 
)
inline

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

◆ getNumScalarOrVectorTotalBitWidth()

unsigned SPIRVGlobalRegistry::getNumScalarOrVectorTotalBitWidth ( const SPIRVType Type) const

Definition at line 1228 of file SPIRVGlobalRegistry.cpp.

References assert(), and getSPIRVTypeForVReg().

Referenced by isBitcastCompatible().

◆ getOrCreateConsIntVector()

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

◆ 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,
MachineIRBuilder MIRBuilder 
)

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

◆ getOrCreateOpTypeDeviceEvent()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeDeviceEvent ( MachineIRBuilder MIRBuilder)

◆ getOrCreateOpTypeFunctionWithArgs()

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

◆ getOrCreateOpTypeImage()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeImage ( MachineIRBuilder MIRBuilder,
SPIRVType SampledType,
SPIRV::Dim::Dim  Dim,
uint32_t  Depth,
uint32_t  Arrayed,
uint32_t  Multisampled,
uint32_t  Sampled,
SPIRV::ImageFormat::ImageFormat  ImageFormat,
SPIRV::AccessQualifier::AccessQualifier  AccQual 
)

◆ getOrCreateOpTypePipe()

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

◆ getOrCreateOpTypeSampledImage()

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

◆ getOrCreateOpTypeSampler()

SPIRVType * SPIRVGlobalRegistry::getOrCreateOpTypeSampler ( MachineIRBuilder MIRBuilder)

◆ getOrCreateSPIRVArrayType()

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

◆ getOrCreateSPIRVBoolType() [1/2]

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

◆ getOrCreateSPIRVBoolType() [2/2]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVBoolType ( MachineIRBuilder MIRBuilder)

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

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVPointerType ( SPIRVType BaseType,
MachineInstr I,
const SPIRVInstrInfo TII,
SPIRV::StorageClass::StorageClass  SClass = SPIRV::StorageClass::Function 
)

Definition at line 1615 of file SPIRVGlobalRegistry.cpp.

References getOrCreateSPIRVPointerType(), and I.

◆ getOrCreateSPIRVPointerType() [2/2]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVPointerType ( SPIRVType BaseType,
MachineIRBuilder MIRBuilder,
SPIRV::StorageClass::StorageClass  SClass = SPIRV::StorageClass::Function 
)

◆ getOrCreateSPIRVType() [1/2]

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVType ( const Type Type,
MachineIRBuilder MIRBuilder,
SPIRV::AccessQualifier::AccessQualifier  AQ = SPIRV::AccessQualifier::ReadWrite,
bool  EmitIR = true 
)

◆ getOrCreateSPIRVType() [2/2]

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

◆ getOrCreateSPIRVTypeByName()

SPIRVType * SPIRVGlobalRegistry::getOrCreateSPIRVTypeByName ( StringRef  TypeStr,
MachineIRBuilder MIRBuilder,
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 
)

◆ getOrCreateUndef()

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

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

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

Definition at line 1105 of file SPIRVGlobalRegistry.cpp.

References CurMF.

Referenced by llvm::buildAtomicCompareExchangeInst(), buildGlobalVariable(), llvm::buildNDRange(), buildOpBitcast(), createNewIdReg(), llvm::SPIRVTargetLowering::finalizeLowering(), llvm::generateCoopMatrInst(), llvm::generateDotOrFMulInst(), llvm::generateGroupInst(), llvm::generateICarryBorrowInst(), llvm::generateImageMiscQueryInst(), llvm::generateImageSizeQueryInst(), llvm::generateIntelSubgroupsInst(), llvm::generateReadImageInst(), llvm::generateSampleImageInst(), llvm::genWorkgroupQuery(), getNumScalarOrVectorTotalBitWidth(), getOrCreateConstIntArray(), getOrCreateOpTypeFunctionWithArgs(), getOrCreateSPIRVArrayType(), getOrCreateSPIRVBoolType(), getOrCreateSPIRVPointerType(), getOrCreateSPIRVType(), getOrCreateSPIRVVectorType(), getPointeeType(), getPointeeTypeOp(), getPointerStorageClass(), getRegClass(), getRegType(), getResultType(), getScalarOrVectorBitWidth(), getScalarOrVectorComponentCount(), getScalarOrVectorComponentType(), hasSPIRVTypeForVReg(), insertBitcasts(), isScalarOfType(), isScalarOrVectorOfType(), llvm::SPIRVLegalizerInfo::legalizeCustom(), llvm::SPIRV::lowerBuiltin(), llvm::SPIRVCallLowering::lowerCall(), patchPhis(), llvm::processInstr(), processNewInstrs(), propagateSPIRVType(), retrieveScalarOrVectorIntType(), llvm::setRegClassIfNull(), validateAccessChain(), validateFunCallMachineDef(), validateGroupWaitEventsPtr(), validateLifetimeStart(), validatePtrTypes(), and validatePtrUnwrapStructField().

◆ getSPIRVTypeID()

Register SPIRVGlobalRegistry::getSPIRVTypeID ( const SPIRVType SpirvType) const

Definition at line 968 of file SPIRVGlobalRegistry.cpp.

References assert(), llvm::MachineInstr::defs(), llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::uses().

Referenced by addConstantsToTrack(), llvm::buildAtomicCompareExchangeInst(), llvm::buildAtomicFlagInst(), llvm::buildAtomicFloatingRMWInst(), llvm::buildAtomicLoadInst(), llvm::buildAtomicRMWInst(), buildConstantFP(), buildConstantInt(), buildConstantSampler(), llvm::buildEnqueueKernel(), buildGlobalVariable(), llvm::buildNDRange(), buildOpBitcast(), doInsertBitcast(), llvm::generateAsyncCopy(), llvm::generateAtomicInst(), 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(), getOrCreateConstInt(), getOrCreateConstNullPtr(), getOrCreateOpTypeCoopMatr(), getOrCreateOpTypeFunctionWithArgs(), getOrCreateOpTypeImage(), getOrCreateOpTypeSampledImage(), getOrCreateSPIRVArrayType(), getOrCreateSPIRVBoolType(), getOrCreateSPIRVPointerType(), getOrCreateSPIRVType(), getOrCreateSPIRVVectorType(), getOrCreateUndef(), llvm::insertAssignInstr(), insertInlineAsmProcess(), llvm::SPIRV::lowerBuiltinType(), llvm::SPIRVCallLowering::lowerCall(), llvm::SPIRVCallLowering::lowerFormalArguments(), and patchPhis().

◆ 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 378 of file SPIRVGlobalRegistry.h.

References getSPIRVTypeForVReg().

◆ invalidateMachineInstr()

void SPIRVGlobalRegistry::invalidateMachineInstr ( MachineInstr MI)

Definition at line 160 of file SPIRVGlobalRegistry.cpp.

References MI.

◆ isAggregateType()

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

Definition at line 393 of file SPIRVGlobalRegistry.h.

◆ isBitcastCompatible()

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

◆ 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 290 of file SPIRVGlobalRegistry.h.

References F.

◆ retrieveScalarOrVectorIntType()

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

Definition at line 1242 of file SPIRVGlobalRegistry.cpp.

References getSPIRVTypeForVReg().

Referenced by isBitcastCompatible(), and isScalarOrVectorSigned().

◆ setBound()

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

Definition at line 160 of file SPIRVGlobalRegistry.h.

◆ setCurrentFunc()

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

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