Lines Matching defs:SPIRVGlobalRegistry

1 //===-- SPIRVGlobalRegistry.cpp - SPIR-V Global Registry --------*- C++ -*-===//
9 // This file contains the implementation of the SPIRVGlobalRegistry class,
17 #include "SPIRVGlobalRegistry.h"
30 SPIRVGlobalRegistry::SPIRVGlobalRegistry(unsigned PointerSize)
33 SPIRVType *SPIRVGlobalRegistry::assignIntTypeToVReg(unsigned BitWidth,
43 SPIRVGlobalRegistry::assignFloatTypeToVReg(unsigned BitWidth, Register VReg,
51 SPIRVType *SPIRVGlobalRegistry::assignVectTypeToVReg(
60 SPIRVType *SPIRVGlobalRegistry::assignTypeToVReg(
69 void SPIRVGlobalRegistry::assignSPIRVTypeToVReg(SPIRVType *SpirvType,
88 SPIRVType *SPIRVGlobalRegistry::getOpTypeBool(MachineIRBuilder &MIRBuilder) {
93 unsigned SPIRVGlobalRegistry::adjustOpTypeIntWidth(unsigned Width) const {
111 SPIRVType *SPIRVGlobalRegistry::getOpTypeInt(unsigned Width,
131 SPIRVType *SPIRVGlobalRegistry::getOpTypeFloat(uint32_t Width,
139 SPIRVType *SPIRVGlobalRegistry::getOpTypeVoid(MachineIRBuilder &MIRBuilder) {
144 SPIRVType *SPIRVGlobalRegistry::getOpTypeVector(uint32_t NumElems,
161 SPIRVGlobalRegistry::getOrCreateConstIntReg(uint64_t Val, SPIRVType *SpvType,
192 SPIRVGlobalRegistry::getOrCreateConstFloatReg(APFloat Val, SPIRVType *SpvType,
228 Register SPIRVGlobalRegistry::getOrCreateConstFP(APFloat Val, MachineInstr &I,
264 Register SPIRVGlobalRegistry::getOrCreateConstInt(uint64_t Val, MachineInstr &I,
296 Register SPIRVGlobalRegistry::buildConstantInt(uint64_t Val,
343 Register SPIRVGlobalRegistry::buildConstantFP(APFloat Val,
371 Register SPIRVGlobalRegistry::getOrCreateBaseRegister(Constant *Val,
393 Register SPIRVGlobalRegistry::getOrCreateCompositeOrNull(
439 Register SPIRVGlobalRegistry::getOrCreateConstVector(uint64_t Val,
458 Register SPIRVGlobalRegistry::getOrCreateConstVector(APFloat Val,
477 Register SPIRVGlobalRegistry::getOrCreateConstIntArray(
502 Register SPIRVGlobalRegistry::getOrCreateIntCompositeOrNull(
540 SPIRVGlobalRegistry::getOrCreateConsIntVector(uint64_t Val,
557 SPIRVGlobalRegistry::getOrCreateConstNullPtr(MachineIRBuilder &MIRBuilder,
578 Register SPIRVGlobalRegistry::buildConstantSampler(
602 Register SPIRVGlobalRegistry::buildGlobalVariable(
704 SPIRVType *SPIRVGlobalRegistry::getOpTypeArray(uint32_t NumElems,
719 SPIRVType *SPIRVGlobalRegistry::getOpTypeOpaque(const StructType *Ty,
730 SPIRVType *SPIRVGlobalRegistry::getOpTypeStruct(const StructType *Ty,
751 SPIRVType *SPIRVGlobalRegistry::getOrCreateSpecialType(
758 SPIRVType *SPIRVGlobalRegistry::getOpTypePointer(
769 SPIRVType *SPIRVGlobalRegistry::getOpTypeForwardPointer(
776 SPIRVType *SPIRVGlobalRegistry::getOpTypeFunction(
787 SPIRVType *SPIRVGlobalRegistry::getOrCreateOpTypeFunctionWithArgs(
799 SPIRVType *SPIRVGlobalRegistry::findSPIRVType(
811 Register SPIRVGlobalRegistry::getSPIRVTypeID(const SPIRVType *SpirvType) const {
821 // such an adjustment SPIRVGlobalRegistry::getOpTypeInt() could create the
826 const Type *SPIRVGlobalRegistry::adjustIntTypeByWidth(const Type *Ty) const {
839 SPIRVType *SPIRVGlobalRegistry::createSPIRVType(
920 SPIRVType *SPIRVGlobalRegistry::restOfCreateSPIRVType(
951 SPIRVGlobalRegistry::getSPIRVTypeForVReg(Register VReg,
962 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVType(
997 bool SPIRVGlobalRegistry::isScalarOfType(Register VReg,
1004 bool SPIRVGlobalRegistry::isScalarOrVectorOfType(Register VReg,
1019 SPIRVGlobalRegistry::getScalarOrVectorComponentCount(Register VReg) const {
1024 SPIRVGlobalRegistry::getScalarOrVectorComponentCount(SPIRVType *Type) const {
1033 SPIRVGlobalRegistry::getScalarOrVectorBitWidth(const SPIRVType *Type) const {
1047 unsigned SPIRVGlobalRegistry::getNumScalarOrVectorTotalBitWidth(
1061 const SPIRVType *SPIRVGlobalRegistry::retrieveScalarOrVectorIntType(
1068 bool SPIRVGlobalRegistry::isScalarOrVectorSigned(const SPIRVType *Type) const {
1073 SPIRVType *SPIRVGlobalRegistry::getPointeeType(SPIRVType *PtrType) {
1079 unsigned SPIRVGlobalRegistry::getPointeeTypeOp(Register PtrReg) {
1084 bool SPIRVGlobalRegistry::isBitcastCompatible(const SPIRVType *Type1,
1104 SPIRVGlobalRegistry::getPointerStorageClass(Register VReg) const {
1112 SPIRVType *SPIRVGlobalRegistry::getOrCreateOpTypeImage(
1137 SPIRVGlobalRegistry::getOrCreateOpTypeSampler(MachineIRBuilder &MIRBuilder) {
1146 SPIRVType *SPIRVGlobalRegistry::getOrCreateOpTypePipe(
1159 SPIRVType *SPIRVGlobalRegistry::getOrCreateOpTypeDeviceEvent(
1169 SPIRVType *SPIRVGlobalRegistry::getOrCreateOpTypeSampledImage(
1184 SPIRVType *SPIRVGlobalRegistry::getOrCreateOpTypeCoopMatr(
1204 SPIRVType *SPIRVGlobalRegistry::getOrCreateOpTypeByOpcode(
1216 SPIRVGlobalRegistry::checkSpecialInstr(const SPIRV::SpecialTypeDescriptor &TD,
1225 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVTypeByName(
1272 SPIRVGlobalRegistry::getOrCreateSPIRVIntegerType(unsigned BitWidth,
1279 SPIRVType *SPIRVGlobalRegistry::finishCreatingSPIRVType(const Type *LLVMTy,
1287 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVType(unsigned BitWidth,
1304 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVIntegerType(
1307 // such an adjustment SPIRVGlobalRegistry::getOpTypeInt() could create, for
1315 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(
1336 SPIRVGlobalRegistry::getOrCreateSPIRVBoolType(MachineIRBuilder &MIRBuilder) {
1343 SPIRVGlobalRegistry::getOrCreateSPIRVBoolType(MachineInstr &I,
1356 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVVectorType(
1364 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVVectorType(
1381 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVArrayType(
1400 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(
1422 SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(
1429 Register SPIRVGlobalRegistry::getOrCreateUndef(MachineInstr &I,