Home
last modified time | relevance | path

Searched refs:structType (Results 1 – 25 of 31) sorted by relevance

12

/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/Utils/
H A DLayoutUtils.cpp21 VulkanLayoutUtils::decorateType(spirv::StructType structType) { in decorateType() argument
24 return decorateType(structType, size, alignment); in decorateType()
28 VulkanLayoutUtils::decorateType(spirv::StructType structType, in decorateType() argument
31 if (structType.getNumElements() == 0) { in decorateType()
32 return structType; in decorateType()
70 structType.getMemberDecorations(memberDecorations); in decorateType()
72 if (!structType.isIdentified()) in decorateType()
88 if (auto structType = type.dyn_cast<spirv::StructType>()) in decorateType() local
89 return decorateType(structType, size, alignment); in decorateType()
167 if (!structType) { in isLegalType()
[all …]
/llvm-project-15.0.7/mlir/unittests/Dialect/LLVMIR/
H A DLLVMTypeTest.cpp49 auto structType = subElementTypes[1].dyn_cast<LLVMStructType>(); in TEST_F() local
50 ASSERT_TRUE(bool(structType)); in TEST_F()
51 ASSERT_TRUE(structType.getName().equals("foo")); in TEST_F()
57 structType = subElementTypes[3].dyn_cast<LLVMStructType>(); in TEST_F()
58 ASSERT_TRUE(bool(structType)); in TEST_F()
59 ASSERT_TRUE(structType.getName().equals("bar")); in TEST_F()
/llvm-project-15.0.7/mlir/unittests/Dialect/SPIRV/
H A DSerializationTest.cpp118 auto structType = getFloatStructType(); in TEST_F() local
119 addGlobalVar(structType, "var0"); in TEST_F()
132 auto structType = getFloatStructType(); in TEST_F() local
135 addGlobalVar(structType, "var0"); in TEST_F()
136 addGlobalVar(structType, "var1"); in TEST_F()
153 auto structType = getFloatStructType(); in TEST_F() local
154 addGlobalVar(structType, "var0"); in TEST_F()
169 auto structType = getFloatStructType(); in TEST_F() local
170 addGlobalVar(structType, "var0"); in TEST_F()
H A DDeserializationTest.cpp187 auto structType = addStructType({int32Type, int32Type}); in TEST_F() local
190 SmallVector<uint32_t, 5> operands1 = {structType, 0}; in TEST_F()
194 SmallVector<uint32_t, 5> operands2 = {structType, 1}; in TEST_F()
209 auto structType = addStructType({int32Type, int64Type}); in TEST_F() local
212 SmallVector<uint32_t, 5> operands1 = {structType}; in TEST_F()
226 auto structType = addStructType({int32Type}); in TEST_F() local
229 SmallVector<uint32_t, 5> operands = {structType, 0}; in TEST_F()
/llvm-project-15.0.7/mlir/lib/Conversion/LLVMCommon/
H A DStructBuilder.cpp20 StructBuilder::StructBuilder(Value v) : value(v), structType(v.getType()) { in StructBuilder()
22 assert(LLVM::isCompatibleType(structType) && "expected llvm type"); in StructBuilder()
27 Type type = structType.cast<LLVM::LLVMStructType>().getBody()[pos]; in extractPtr()
34 value = builder.create<LLVM::InsertValueOp>(loc, structType, value, ptr, in setPtr()
H A DMemRefBuilder.cpp116 loc, structType, value, offset, in setOffset()
160 loc, structType, value, size, in setSize()
181 loc, structType, value, stride, in setStride()
H A DPattern.cpp203 auto structType = typeConverter->convertType(memRefType); in createMemRefDescriptor() local
204 auto memRefDescriptor = MemRefDescriptor::undef(rewriter, loc, structType); in createMemRefDescriptor()
H A DTypeConverter.cpp250 if (auto structType = resultType.dyn_cast<LLVM::LLVMStructType>()) { in convertFunctionTypeCWrapper() local
253 inputs.push_back(LLVM::LLVMPointerType::get(structType)); in convertFunctionTypeCWrapper()
/llvm-project-15.0.7/mlir/lib/Conversion/ComplexToLLVM/
H A DComplexToLLVM.cpp100 auto structType = typeConverter->convertType(complexOp.getType()); in matchAndRewrite() local
101 auto complexStruct = ComplexStructBuilder::undef(rewriter, loc, structType); in matchAndRewrite()
174 auto structType = typeConverter->convertType(op.getType()); in matchAndRewrite() local
175 auto result = ComplexStructBuilder::undef(rewriter, loc, structType); in matchAndRewrite()
202 auto structType = typeConverter->convertType(op.getType()); in matchAndRewrite() local
203 auto result = ComplexStructBuilder::undef(rewriter, loc, structType); in matchAndRewrite()
247 auto structType = typeConverter->convertType(op.getType()); in matchAndRewrite() local
248 auto result = ComplexStructBuilder::undef(rewriter, loc, structType); in matchAndRewrite()
284 auto structType = typeConverter->convertType(op.getType()); in matchAndRewrite() local
285 auto result = ComplexStructBuilder::undef(rewriter, loc, structType); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Target/LLVMIR/
H A DTypeToLLVM.cpp125 llvm::StructType *structType = in translate() local
129 knownTranslations.try_emplace(type, structType); in translate()
131 return structType; in translate()
134 structType->setBody(subtypes, type.isPacked()); in translate()
135 return structType; in translate()
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/Transforms/
H A DDecorateCompositeTypeLayoutPass.cpp37 auto structType = VulkanLayoutUtils::decorateType( in matchAndRewrite() local
40 if (!structType) in matchAndRewrite()
44 spirv::PointerType::get(structType, ptrType.getStorageClass()); in matchAndRewrite()
H A DUnifyAliasedResourcePass.cpp64 auto structType = ptrType.getPointeeType().dyn_cast<spirv::StructType>(); in getRuntimeArrayElementType() local
65 if (!structType || structType.getNumElements() != 1) in getRuntimeArrayElementType()
69 structType.getElementType(0).dyn_cast<spirv::RuntimeArrayType>(); in getRuntimeArrayElementType()
H A DSPIRVConversion.cpp106 auto structType = needsExplicitLayout(storageClass) in wrapInStructAndGetPointer() local
109 return spirv::PointerType::get(structType, storageClass); in wrapInStructAndGetPointer()
689 auto structType = spirv::StructType::get({arrayType}, /*offsetInfo=*/0); in getPushConstantStorageType() local
690 return spirv::PointerType::get(structType, spirv::StorageClass::PushConstant); in getPushConstantStorageType()
/llvm-project-15.0.7/mlir/include/mlir/Dialect/SPIRV/Utils/
H A DLayoutUtils.h54 static spirv::StructType decorateType(spirv::StructType structType);
71 static spirv::StructType decorateType(spirv::StructType structType,
/llvm-project-15.0.7/mlir/lib/Target/SPIRV/Serialization/
H A DSerializer.cpp472 auto structType = spirv::StructType::getIdentified( in prepareBasicType() local
475 if (!structType) in prepareBasicType()
484 recursiveStructInfos[structType].push_back( in prepareBasicType()
528 if (auto structType = type.dyn_cast<spirv::StructType>()) { in prepareBasicType() local
529 if (structType.isIdentified()) { in prepareBasicType()
532 serializationCtx.insert(structType.getIdentifier()); in prepareBasicType()
535 bool hasOffset = structType.hasOffset(); in prepareBasicType()
557 structType.getMemberDecorations(memberDecorations); in prepareBasicType()
563 << "-th member of " << structType << " with " in prepareBasicType()
570 if (structType.isIdentified()) in prepareBasicType()
[all …]
/llvm-project-15.0.7/mlir/lib/Conversion/NVGPUToNVVM/
H A DNVGPUToNVVM.cpp64 auto structType = intrinsicResultType.dyn_cast<LLVM::LLVMStructType>(); in convertIntrinsicResult() local
87 for (unsigned i = 0; i < structType.getBody().size(); i++) { in convertIntrinsicResult()
89 loc, structType.getBody()[i], intrinsicResult, in convertIntrinsicResult()
105 for (unsigned i = 0, e = structType.getBody().size() / 2; i < e; i++) { in convertIntrinsicResult()
109 loc, structType.getBody()[i * 2], intrinsicResult, in convertIntrinsicResult()
112 loc, structType.getBody()[i * 2 + 1], intrinsicResult, in convertIntrinsicResult()
/llvm-project-15.0.7/mlir/lib/Conversion/OpenACCToLLVM/
H A DOpenACCToLLVM.cpp102 Type structType = converter->convertType(memRefType); in matchAndRewrite() local
105 loc, structType, originalDataOperand) in matchAndRewrite()
119 auto descr = DataDescriptor::undef(builder, loc, structType, ptrType); in matchAndRewrite()
/llvm-project-15.0.7/mlir/include/mlir/Conversion/LLVMCommon/
H A DStructBuilder.h40 Type structType; variable
/llvm-project-15.0.7/mlir/lib/Dialect/LLVMIR/IR/
H A DLLVMDialect.cpp511 ArrayRef<Type> elementTypes = structType.getBody(); in recordStructIndices()
1447 llvmType = structType.getBody()[position]; in getInsertExtractValueElementType()
1492 llvmType = structType.getBody()[position]; in getInsertExtractValueElementType()
2401 if (auto structType = getType().dyn_cast<LLVMStructType>()) { in verify() local
2402 if (structType.getBody().size() != 2 || in verify()
2403 structType.getBody()[0] != structType.getBody()[1]) { in verify()
2415 Type elementType = structType.getBody()[0]; in verify()
2838 auto structType = annotatedType.dyn_cast<LLVMStructType>(); in verifyStructAttr() local
2839 if (!structType) { in verifyStructAttr()
2849 if (!structType) in verifyStructAttr()
[all …]
H A DLLVMTypeSyntax.cpp170 if (auto structType = type.dyn_cast<LLVMStructType>()) in printType() local
171 return printStructType(printer, structType); in printType()
H A DNVVMDialect.cpp95 if (auto structType = operandElType.dyn_cast<LLVM::LLVMStructType>()) { in inferOperandMMAType() local
96 if (structType.getBody().empty()) in inferOperandMMAType()
98 return inferOperandMMAType(structType.getBody()[0], isAccumulator); in inferOperandMMAType()
/llvm-project-15.0.7/mlir/lib/Conversion/GPUToNVVM/
H A DWmmaOpsToNvvm.cpp204 auto structType = operand.getType().cast<LLVM::LLVMStructType>(); in matchAndRewrite() local
205 for (size_t i = 0, e = structType.getBody().size(); i < e; ++i) { in matchAndRewrite()
207 loc, structType.getBody()[i], operand, rewriter.getI32ArrayAttr(i)); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/
H A DSPIRVTypes.cpp127 if (auto structType = dyn_cast<StructType>()) in getNumElements() local
128 return structType.getNumElements(); in getNumElements()
183 if (auto structType = dyn_cast<StructType>()) in getSizeInBytes() local
184 return structType.getSizeInBytes(); in getSizeInBytes()
/llvm-project-15.0.7/mlir/examples/toy/Ch7/mlir/
H A DDialect.cpp601 StructType structType = type.cast<StructType>(); in printType() local
605 llvm::interleaveComma(structType.getElementTypes(), printer); in printType()
/llvm-project-15.0.7/mlir/lib/Conversion/SPIRVToLLVM/
H A DSPIRVToLLVM.cpp673 auto structType = LLVM::LLVMStructType::getLiteral(context, fields); in matchAndRewrite() local
677 UnknownLoc::get(context), structType, /*isConstant=*/true, in matchAndRewrite()
686 Value structValue = rewriter.create<LLVM::UndefOp>(loc, structType); in matchAndRewrite()
690 loc, structType, structValue, executionMode, in matchAndRewrite()
699 loc, structType, structValue, entry, in matchAndRewrite()

12