Home
last modified time | relevance | path

Searched refs:IntegerType (Results 1 – 25 of 414) sorted by relevance

12345678910>>...17

/llvm-project-15.0.7/mlir/lib/IR/
H A DTypes.cpp32 if (auto intTy = dyn_cast<IntegerType>()) in isInteger()
38 if (auto intTy = dyn_cast<IntegerType>()) in isSignlessInteger()
44 if (auto intTy = dyn_cast<IntegerType>()) in isSignlessInteger()
50 if (auto intTy = dyn_cast<IntegerType>()) in isSignedInteger()
56 if (auto intTy = dyn_cast<IntegerType>()) in isSignedInteger()
62 if (auto intTy = dyn_cast<IntegerType>()) in isUnsignedInteger()
68 if (auto intTy = dyn_cast<IntegerType>()) in isUnsignedInteger()
85 bool Type::isIntOrIndex() const { return isa<IntegerType>() || isIndex(); } in isIntOrIndex()
87 bool Type::isIntOrFloat() const { return isa<IntegerType, FloatType>(); } in isIntOrFloat()
93 if (auto intType = dyn_cast<IntegerType>()) in getIntOrFloatBitWidth()
H A DMLIRContext.cpp288 impl->int1Ty = TypeUniquer::get<IntegerType>(this, 1, IntegerType::Signless); in MLIRContext()
289 impl->int8Ty = TypeUniquer::get<IntegerType>(this, 8, IntegerType::Signless); in MLIRContext()
291 TypeUniquer::get<IntegerType>(this, 16, IntegerType::Signless); in MLIRContext()
293 TypeUniquer::get<IntegerType>(this, 32, IntegerType::Signless); in MLIRContext()
295 TypeUniquer::get<IntegerType>(this, 64, IntegerType::Signless); in MLIRContext()
297 TypeUniquer::get<IntegerType>(this, 128, IntegerType::Signless); in MLIRContext()
834 static IntegerType
839 return IntegerType(); in getCachedIntegerType()
855 return IntegerType(); in getCachedIntegerType()
859 IntegerType IntegerType::get(MLIRContext *context, unsigned width, in get()
[all …]
H A DBuilders.cpp50 IntegerType Builder::getI1Type() { return IntegerType::get(context, 1); } in getI1Type()
52 IntegerType Builder::getI8Type() { return IntegerType::get(context, 8); } in getI8Type()
54 IntegerType Builder::getI32Type() { return IntegerType::get(context, 32); } in getI32Type()
56 IntegerType Builder::getI64Type() { return IntegerType::get(context, 64); } in getI64Type()
58 IntegerType Builder::getIntegerType(unsigned width) { in getIntegerType()
59 return IntegerType::get(context, width); in getIntegerType()
62 IntegerType Builder::getIntegerType(unsigned width, bool isSigned) { in getIntegerType()
63 return IntegerType::get( in getIntegerType()
64 context, width, isSigned ? IntegerType::Signed : IntegerType::Unsigned); in getIntegerType()
269 if (auto integerType = type.dyn_cast<IntegerType>()) in getZeroAttr()
[all …]
/llvm-project-15.0.7/mlir/unittests/IR/
H A DAttributeTest.cpp35 IntegerType boolTy = IntegerType::get(&context, 1); in TEST()
60 IntegerType boolTy = IntegerType::get(&context, 1); in TEST()
83 IntegerType boolTy = IntegerType::get(&context, 1); in TEST()
96 IntegerType intTy = IntegerType::get(&context, intWidth); in TEST()
104 IntegerType intTy = IntegerType::get(&context, 32); in TEST()
112 IntegerType intTy = IntegerType::get(&context, 85); in TEST()
177 ComplexType complexType = ComplexType::get(IntegerType::get(&context, 64)); in TEST()
191 ComplexType complexType = ComplexType::get(IntegerType::get(&context, 64)); in TEST()
199 IntegerType intTy = IntegerType::get(&context, 32); in TEST()
211 IntegerType intTy = IntegerType::get(&context, 32); in TEST()
[all …]
H A DInterfaceAttachmentTest.cpp63 IntegerType i8 = IntegerType::get(&context, 8); in TEST()
67 IntegerType::attachInterface<Model>(context); in TEST()
88 IntegerType i8other = IntegerType::get(&other, 8); in TEST()
141 IntegerType::attachInterface<Model>(*ctx); in TEST()
154 IntegerType::attachInterface<Model>(*ctx); in TEST()
158 IntegerType i16 = IntegerType::get(&context, 16); in TEST()
162 IntegerType i32 = IntegerType::get(&initiallyEmpty, 32); in TEST()
173 TestExternalFallbackTypeIntegerModel, IntegerType> {};
184 IntegerType elementType = type.cast<VectorType>() in getBitwidth()
186 .dyn_cast_or_null<IntegerType>(); in getBitwidth()
[all …]
/llvm-project-15.0.7/mlir/unittests/Interfaces/
H A DDataLayoutInterfacesTest.cpp141 if (auto iType = type.dyn_cast<IntegerType>()) { in getTypeSizeInBits()
255 EXPECT_EQ(layout.getTypeSize(IntegerType::get(&ctx, 42)), 6u); in TEST()
257 EXPECT_EQ(layout.getTypeSizeInBits(IntegerType::get(&ctx, 42)), 42u); in TEST()
259 EXPECT_EQ(layout.getTypeABIAlignment(IntegerType::get(&ctx, 42)), 8u); in TEST()
278 EXPECT_EQ(layout.getTypeSize(IntegerType::get(&ctx, 42)), 42u); in TEST()
301 EXPECT_EQ(layout.getTypeSize(IntegerType::get(&ctx, 42)), 42u); in TEST()
327 EXPECT_EQ(layout.getTypeSize(IntegerType::get(&ctx, 42)), 5u); in TEST()
329 EXPECT_EQ(layout.getTypeSizeInBits(IntegerType::get(&ctx, 42)), 40u); in TEST()
336 EXPECT_EQ(layout.getTypeSize(IntegerType::get(&ctx, 32)), 32u); in TEST()
438 EXPECT_EQ(layout.getTypeSize(IntegerType::get(&ctx, 42)), 6u); in TEST()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DSignedCharMisuseCheck.cpp38 bool IsSigned, const Matcher<clang::QualType> &IntegerType, in charCastExpression() argument
57 hasImplicitDestinationType(IntegerType)) in charCastExpression()
72 const auto IntegerType = in registerMatchers() local
76 charCastExpression(true, IntegerType, "signedCastExpression"); in registerMatchers()
78 charCastExpression(false, IntegerType, "unsignedCastExpression"); in registerMatchers()
82 expr(binaryOperator(hasOperatorName("="), hasLHS(hasType(IntegerType)), in registerMatchers()
88 const auto Declaration = varDecl(isDefinition(), hasType(IntegerType), in registerMatchers()
127 const auto *IntegerType = Result.Nodes.getNodeAs<QualType>("integerType"); in check() local
129 assert(IntegerType); in check()
162 << *IntegerType; in check()
[all …]
/llvm-project-15.0.7/flang/lib/Optimizer/CodeGen/
H A DDescriptorModel.h42 return mlir::LLVM::LLVMPointerType::get(mlir::IntegerType::get(context, 8));
48 return mlir::IntegerType::get(context, sizeof(unsigned) * 8);
54 return mlir::IntegerType::get(context, sizeof(int) * 8);
60 return mlir::IntegerType::get(context, sizeof(unsigned long) * 8);
66 return mlir::IntegerType::get(context, sizeof(unsigned long long) * 8);
72 return mlir::IntegerType::get(context, sizeof(long long) * 8);
78 return mlir::IntegerType::get(context,
85 return mlir::IntegerType::get(context,
92 return mlir::IntegerType::get(context, sizeof(long) * 8);
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCodeGenTypeCache.h22 class IntegerType; variable
37 llvm::IntegerType *Int8Ty, *Int16Ty, *Int32Ty, *Int64Ty;
42 llvm::IntegerType *IntTy;
45 llvm::IntegerType *CharTy;
49 llvm::IntegerType *IntPtrTy;
50 llvm::IntegerType *SizeTy;
51 llvm::IntegerType *PtrDiffTy;
/llvm-project-15.0.7/llvm/include/llvm/ADT/
H A DBitfields.h159 using IntegerType = typename Bitfield::IntegerType;
160 using C = Compressor<IntegerType, Bitfield::Bits>;
170 static void update(StorageType &Packed, IntegerType UserValue) {
178 static IntegerType extract(StorageType Packed) {
225 using IntegerType =
237 static constexpr size_t TypeBits = sizeof(IntegerType) * CHAR_BIT;
242 std::is_unsigned<IntegerType>::value,
244 static_assert(std::is_integral<IntegerType>::value &&
245 std::numeric_limits<IntegerType>::is_integer,
248 static constexpr IntegerType UserMaxValue =
[all …]
/llvm-project-15.0.7/mlir/unittests/Dialect/Quant/
H A DQuantizationUtilsTest.cpp29 return APInt(qtype.getStorageType().cast<IntegerType>().getWidth(), 5L); in quantizeFloatToInt()
62 auto indicesType = RankedTensorType::get({1, 2}, IntegerType::get(ctx, 64)); in getTestSparseElementsAttr()
80 IntegerType convertedType = IntegerType::get(&ctx, 8); in TEST()
91 valueResult.cast<IntegerAttr>().getType().cast<IntegerType>().getWidth(), in TEST()
98 IntegerType convertedType = IntegerType::get(&ctx, 8); in TEST()
124 IntegerType convertedType = IntegerType::get(&ctx, 8); in TEST()
150 IntegerType convertedType = IntegerType::get(&ctx, 8); in TEST()
/llvm-project-15.0.7/mlir/test/python/dialects/
H A Dods_helpers.py16 results=[IntegerType.get_signless(32)]).result
90 t0 = IntegerType.get_signless(8)
91 t1 = IntegerType.get_signless(16)
119 t0 = IntegerType.get_signless(8)
120 t1 = IntegerType.get_signless(16)
121 t2 = IntegerType.get_signless(32)
122 t3 = IntegerType.get_signless(64)
193 t0 = IntegerType.get_signless(8)
194 t1 = IntegerType.get_signless(16)
/llvm-project-15.0.7/mlir/test/python/ir/
H A Dbuiltin_types.py95 print(IntegerType.isinstance(t1))
134 tint = IntegerType(t1)
135 tself = IntegerType(tint)
139 tillegal = IntegerType(Type.parse("f32", ctx))
151 i32 = IntegerType(Type.parse("i32"))
161 s32 = IntegerType(Type.parse("si32"))
169 u32 = IntegerType(Type.parse("ui32"))
180 print("signed:", IntegerType.get_signed(8))
451 i32 = IntegerType(Type.parse("i32"))
468 input_types = [IntegerType.get_signless(32),
[all …]
/llvm-project-15.0.7/mlir/lib/Conversion/GPUCommon/
H A DIndexIntrinsicsOpLowering.h42 newOp = rewriter.create<XOp>(loc, IntegerType::get(context, 32)); in matchAndRewrite()
45 newOp = rewriter.create<YOp>(loc, IntegerType::get(context, 32)); in matchAndRewrite()
48 newOp = rewriter.create<ZOp>(loc, IntegerType::get(context, 32)); in matchAndRewrite()
54 loc, IntegerType::get(context, indexBitwidth), newOp); in matchAndRewrite()
57 loc, IntegerType::get(context, indexBitwidth), newOp); in matchAndRewrite()
/llvm-project-15.0.7/flang/lib/Optimizer/Builder/Runtime/
H A DReduction.cpp29 auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); in getTypeModel()
45 auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); in getTypeModel()
58 auto ty = mlir::IntegerType::get(ctx, 128); in getTypeModel()
62 auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); in getTypeModel()
78 auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); in getTypeModel()
94 auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); in getTypeModel()
107 auto ty = mlir::IntegerType::get(ctx, 128); in getTypeModel()
111 auto intTy = mlir::IntegerType::get(ctx, 8 * sizeof(int)); in getTypeModel()
156 auto ty = mlir::IntegerType::get(ctx, 128); in getTypeModel()
277 auto ty = mlir::IntegerType::get(ctx, 128); in getTypeModel()
[all …]
/llvm-project-15.0.7/llvm/examples/BrainF/
H A DBrainF.cpp76 module->getOrInsertFunction("getchar", IntegerType::getInt32Ty(C)); in header()
80 "putchar", IntegerType::getInt32Ty(C), IntegerType::getInt32Ty(C)); in header()
93 Type* IntPtrTy = IntegerType::getInt32Ty(C); in header()
94 Type* Int8Ty = IntegerType::getInt8Ty(C); in header()
154 "puts", IntegerType::getInt32Ty(C), in header()
155 PointerType::getUnqual(IntegerType::getInt8Ty(C))); in header()
162 Constant *zero_32 = Constant::getNullValue(IntegerType::getInt32Ty(C)); in header()
197 Type *Int8Ty = IntegerType::getInt8Ty(C); in readloop()
216 CreateTrunc(tape_0, IntegerType::getInt8Ty(C), tapereg); in readloop()
230 CreateSExt(tape_0, IntegerType::getInt32Ty(C), tapereg); in readloop()
/llvm-project-15.0.7/flang/include/flang/Optimizer/Builder/Runtime/
H A DRTBuilder.h64 return mlir::IntegerType::get(context, 8 * sizeof(short int));
70 return mlir::IntegerType::get(context, 8 * sizeof(int));
83 return fir::ReferenceType::get(mlir::IntegerType::get(context, 8));
105 return mlir::IntegerType::get(context, 8 * sizeof(char));
111 return mlir::IntegerType::get(context, 8 * sizeof(signed char));
131 return mlir::IntegerType::get(context, 8 * sizeof(long));
148 return mlir::IntegerType::get(context, 8 * sizeof(long long));
154 return mlir::IntegerType::get(context,
172 return mlir::IntegerType::get(context, 8 * sizeof(unsigned long));
218 return mlir::IntegerType::get(context, 1);
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/LLVMIR/IR/
H A DFunctionCallUtils.cpp58 IntegerType::get(moduleOp->getContext(), 64), in lookupOrCreatePrintI64Fn()
64 IntegerType::get(moduleOp->getContext(), 64), in lookupOrCreatePrintU64Fn()
104 LLVM::LLVMPointerType::get(IntegerType::get(moduleOp->getContext(), 8))); in lookupOrCreateMallocFn()
111 LLVM::LLVMPointerType::get(IntegerType::get(moduleOp->getContext(), 8))); in lookupOrCreateAlignedAllocFn()
117 LLVM::LLVMPointerType::get(IntegerType::get(moduleOp->getContext(), 8)), in lookupOrCreateFreeFn()
125 LLVM::LLVMPointerType::get(IntegerType::get(moduleOp->getContext(), 8))); in lookupOrCreateGenericAllocFn()
133 LLVM::LLVMPointerType::get(IntegerType::get(moduleOp->getContext(), 8))); in lookupOrCreateGenericAlignedAllocFn()
139 LLVM::LLVMPointerType::get(IntegerType::get(moduleOp->getContext(), 8)), in lookupOrCreateGenericFreeFn()
/llvm-project-15.0.7/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/
H A Dmlir-support.cpp14 mlir::Type IntegerType = variable
15 mlir::IntegerType::get(&Context, 3, mlir::IntegerType::Unsigned);
18 mlir::Type UnrankedMemRefType = mlir::UnrankedMemRefType::get(IntegerType, 6);
36 mlir::Attribute IntegerAttr = mlir::IntegerAttr::get(IntegerType, 10);
/llvm-project-15.0.7/llvm/lib/IR/
H A DType.cpp243 IntegerType *Type::getIntNTy(LLVMContext &C, unsigned N) { in getIntNTy()
244 return IntegerType::get(C, N); in getIntNTy()
311 IntegerType *IntegerType::get(LLVMContext &C, unsigned NumBits) { in get()
317 case 1: return cast<IntegerType>(Type::getInt1Ty(C)); in get()
318 case 8: return cast<IntegerType>(Type::getInt8Ty(C)); in get()
319 case 16: return cast<IntegerType>(Type::getInt16Ty(C)); in get()
320 case 32: return cast<IntegerType>(Type::getInt32Ty(C)); in get()
321 case 64: return cast<IntegerType>(Type::getInt64Ty(C)); in get()
322 case 128: return cast<IntegerType>(Type::getInt128Ty(C)); in get()
327 IntegerType *&Entry = C.pImpl->IntegerTypes[NumBits]; in get()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/Utils/
H A DUtils.cpp72 auto targetIntegerType = targetType.dyn_cast<IntegerType>(); in getValueOrCreateCastToIndexLike()
73 auto valueIntegerType = value.getType().dyn_cast<IntegerType>(); in getValueOrCreateCastToIndexLike()
96 if (lhs.getType().isa<IntegerType>()) in add()
101 if (lhs.getType().isa<IntegerType>()) in mul()
106 if (lhs.getType().isa<IndexType, IntegerType>()) in sgt()
111 if (lhs.getType().isa<IndexType, IntegerType>()) in slt()
/llvm-project-15.0.7/mlir/test/python/integration/dialects/linalg/
H A Dopsrun.py207 i8 = IntegerType.get_signless(8)
246 i8 = IntegerType.get_signless(8)
287 i8 = IntegerType.get_signless(8)
324 i8 = IntegerType.get_signless(8)
362 i32 = IntegerType.get_signless(32)
397 i32 = IntegerType.get_signless(32)
432 i32 = IntegerType.get_signless(32)
459 i32 = IntegerType.get_signless(32)
486 i32 = IntegerType.get_signless(32)
517 i32 = IntegerType.get_signless(32)
[all …]
/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DType.h29 class IntegerType; variable
434 static IntegerType *getIntNTy(LLVMContext &C, unsigned N);
435 static IntegerType *getInt1Ty(LLVMContext &C);
436 static IntegerType *getInt8Ty(LLVMContext &C);
437 static IntegerType *getInt16Ty(LLVMContext &C);
438 static IntegerType *getInt32Ty(LLVMContext &C);
439 static IntegerType *getInt64Ty(LLVMContext &C);
440 static IntegerType *getInt128Ty(LLVMContext &C);
/llvm-project-15.0.7/mlir/lib/Conversion/GPUToVulkan/
H A DConvertLaunchFuncToVulkanCalls.cpp63 LLVM::LLVMPointerType::get(IntegerType::get(&getContext(), 8)); in initializeCachedTypes()
64 llvmInt32Type = IntegerType::get(&getContext(), 32); in initializeCachedTypes()
65 llvmInt64Type = IntegerType::get(&getContext(), 64); in initializeCachedTypes()
139 if (auto intType = type.dyn_cast<IntegerType>()) { in stringifyType()
245 auto memRefTy = getMemRefType(rank, IntegerType::get(&getContext(), 16)); in createBindMemRefCalls()
325 Float32Type::get(&getContext()), IntegerType::get(&getContext(), 32), in declareVulkanFunctions()
326 IntegerType::get(&getContext(), 16), IntegerType::get(&getContext(), 8), in declareVulkanFunctions()
332 type = IntegerType::get(&getContext(), 16); in declareVulkanFunctions()
/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DValueLatticeTest.cpp29 auto I32Ty = IntegerType::get(Context, 32); in TEST_F()
61 auto I32Ty = IntegerType::get(Context, 32); in TEST_F()
103 auto *I32Ty = IntegerType::get(Context, 32); in TEST_F()
104 auto *I1Ty = IntegerType::get(Context, 1); in TEST_F()
148 auto *FloatTy = IntegerType::getFloatTy(Context); in TEST_F()
149 auto *I1Ty = IntegerType::get(Context, 1); in TEST_F()
173 auto *I32Ty = IntegerType::get(Context, 32); in TEST_F()
174 auto *I1Ty = IntegerType::get(Context, 1); in TEST_F()
186 auto *FloatTy = IntegerType::getFloatTy(Context); in TEST_F()

12345678910>>...17