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, 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 addMutated (Value *Val, Type *Ty)
 
TypefindMutated (const Value *Val)
 
void addDeducedElementType (Value *Val, Type *Ty)
 
TypefindDeducedElementType (const Value *Val)
 
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, 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
 
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
 
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
 
unsigned getPointerSize () const
 
bool isBitcastCompatible (const SPIRVType *Type1, const SPIRVType *Type2) const
 
Register buildConstantInt (uint64_t Val, MachineIRBuilder &MIRBuilder, SPIRVType *SpvType=nullptr, bool EmitIR=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)
 
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)
 

Public Attributes

MachineFunctionCurMF
 

Detailed Description

Definition at line 30 of file SPIRVGlobalRegistry.h.

Constructor & Destructor Documentation

◆ SPIRVGlobalRegistry()

SPIRVGlobalRegistry::SPIRVGlobalRegistry ( unsigned  PointerSize)

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

References llvm::SPIRVGeneralDuplicatesTracker::add().

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

References llvm::SPIRVGeneralDuplicatesTracker::add(), and F.

◆ add() [4/5]

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

Definition at line 109 of file SPIRVGlobalRegistry.h.

References llvm::SPIRVGeneralDuplicatesTracker::add().

◆ add() [5/5]

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

Definition at line 121 of file SPIRVGlobalRegistry.h.

References llvm::SPIRVGeneralDuplicatesTracker::add(), and MI.

◆ addAssignPtrTypeInstr()

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

Definition at line 161 of file SPIRVGlobalRegistry.h.

◆ addDeducedCompositeType()

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

Definition at line 189 of file SPIRVGlobalRegistry.h.

◆ addDeducedElementType()

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

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

◆ addReturnType()

void llvm::SPIRVGlobalRegistry::addReturnType ( const Function ArgF,
TypedPointerType DerivedTy 
)
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()

void SPIRVGlobalRegistry::assignSPIRVTypeToVReg ( SPIRVType Type,
Register  VReg,
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 = nullptr,
bool  EmitIR = 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,
MachineModuleInfo MMI = nullptr 
)
inline

◆ 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

◆ find() [2/4]

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

Definition at line 137 of file SPIRVGlobalRegistry.h.

References F, and llvm::SPIRVGeneralDuplicatesTracker::find().

◆ find() [3/4]

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

◆ 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

◆ getBound()

unsigned llvm::SPIRVGlobalRegistry::getBound ( )
inline

Definition at line 147 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 1046 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 
)

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

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

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

◆ getSPIRVTypeForVReg()

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

◆ getSPIRVTypeID()

Register SPIRVGlobalRegistry::getSPIRVTypeID ( const SPIRVType SpirvType) const

Definition at line 810 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(), doInsertBitcast(), llvm::generateAsyncCopy(), llvm::generateAtomicInst(), llvm::generateConstructInst(), llvm::generateConvertInst(), llvm::generateCoopMatrInst(), llvm::generateDotOrFMulInst(), llvm::generateEnqueueInst(), llvm::generateExtInst(), llvm::generateGroupInst(), llvm::generateGroupUniformInst(), llvm::generateImageMiscQueryInst(), llvm::generateImageSizeQueryInst(), llvm::generateIntelSubgroupsInst(), llvm::generateKernelClockInst(), llvm::generateLoadStoreInst(), llvm::generateReadImageInst(), llvm::generateRelationalInst(), llvm::generateSampleImageInst(), llvm::generateSpecConstantInst(), llvm::generateVectorLoadStoreInst(), getOrCreateConstFP(), getOrCreateConstInt(), getOrCreateConstNullPtr(), getOrCreateOpTypeCoopMatr(), getOrCreateOpTypeFunctionWithArgs(), getOrCreateOpTypeImage(), getOrCreateOpTypeSampledImage(), getOrCreateSPIRVArrayType(), getOrCreateSPIRVBoolType(), getOrCreateSPIRVPointerType(), getOrCreateSPIRVType(), getOrCreateSPIRVVectorType(), getOrCreateUndef(), llvm::insertAssignInstr(), insertInlineAsmProcess(), 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 332 of file SPIRVGlobalRegistry.h.

References getSPIRVTypeForVReg().

◆ isAggregateType()

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

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

References F.

◆ retrieveScalarOrVectorIntType()

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

Definition at line 1060 of file SPIRVGlobalRegistry.cpp.

References getSPIRVTypeForVReg().

Referenced by isBitcastCompatible(), and isScalarOrVectorSigned().

◆ setBound()

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

Definition at line 146 of file SPIRVGlobalRegistry.h.

◆ setCurrentFunc()

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

Member Data Documentation

◆ CurMF

MachineFunction* llvm::SPIRVGlobalRegistry::CurMF

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