Home
last modified time | relevance | path

Searched refs:getWidth (Results 1 – 25 of 64) sorted by relevance

123

/llvm-project-15.0.7/mlir/lib/IR/
H A DTypes.cpp33 return intTy.getWidth() == width; in isInteger()
45 return intTy.isSignless() && intTy.getWidth() == width; in isSignlessInteger()
57 return intTy.isSigned() && intTy.getWidth() == width; in isSignedInteger()
69 return intTy.isUnsigned() && intTy.getWidth() == width; in isUnsignedInteger()
94 return intType.getWidth(); in getIntOrFloatBitWidth()
95 return cast<FloatType>().getWidth(); in getIntOrFloatBitWidth()
/llvm-project-15.0.7/llvm/include/llvm/ADT/
H A DAPFixedPoint.h44 unsigned getWidth() const { return Width; } in getWidth() function
104 assert(Val.getBitWidth() == Sema.getWidth() && in APFixedPoint()
109 : APFixedPoint(APInt(Sema.getWidth(), Val, Sema.isSigned()), Sema) {} in APFixedPoint()
115 inline unsigned getWidth() const { return Sema.getWidth(); } in getWidth() function
/llvm-project-15.0.7/llvm/lib/Support/
H A DAPFixedPoint.cpp22 unsigned DstWidth = DstSema.getWidth(); in convert()
117 auto Val = APSInt::getMaxValue(Sema.getWidth(), IsUnsigned); in getMax()
124 auto Val = APSInt::getMinValue(Sema.getWidth(), !Sema.isSigned()); in getMin()
234 unsigned Wide = CommonFXSema.getWidth() * 2; in mul()
277 return APFixedPoint(Result.sextOrTrunc(CommonFXSema.getWidth()), in mul()
291 unsigned Wide = CommonFXSema.getWidth() * 2; in div()
332 return APFixedPoint(Result.sextOrTrunc(CommonFXSema.getWidth()), in div()
341 unsigned Wide = Sema.getWidth() * 2; in shl()
367 return APFixedPoint(Result.sextOrTrunc(Sema.getWidth()), Sema); in shl()
418 unsigned SrcWidth = getWidth(); in convertToInt()
[all …]
/llvm-project-15.0.7/llvm/include/llvm/Support/
H A DScaledNumber.h42 template <class DigitsT> inline int getWidth() { return sizeof(DigitsT) * 8; } in getWidth() function
59 return std::make_pair(DigitsT(1) << (getWidth<DigitsT>() - 1), Scale + 1); in getRounded()
83 const int Width = getWidth<DigitsT>();
117 if (getWidth<DigitsT>() <= 32 || (LHS <= UINT32_MAX && RHS <= UINT32_MAX)) in getProduct()
164 if (getWidth<DigitsT>() == 64) in getQuotient()
300 if (ScaleDiff >= 2 * getWidth<DigitsT>()) { in matchScales()
308 assert(ShiftL < getWidth<DigitsT>() && "can't shift more than width"); in matchScales()
311 if (ShiftR >= getWidth<DigitsT>()) { in matchScales()
350 DigitsT HighBit = DigitsT(1) << (getWidth<DigitsT>() - 1); in getSum()
391 if (!compare(LDigits, LScale, DigitsT(1), RLgFloor + getWidth<DigitsT>())) in getDifference()
/llvm-project-15.0.7/mlir/unittests/Dialect/Quant/
H A DQuantizationUtilsTest.cpp29 return APInt(qtype.getStorageType().cast<IntegerType>().getWidth(), 5L); in quantizeFloatToInt()
91 valueResult.cast<IntegerAttr>().getType().cast<IntegerType>().getWidth(), in TEST()
92 convertedType.getWidth()); in TEST()
/llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/IR/
H A DArithmeticOps.cpp94 if (intType && intType.getWidth() == 1) in getAsmResultNames()
835 if (srcType.cast<ValType>().getWidth() >= dstType.cast<ValType>().getWidth()) in verifyExtOp()
848 if (srcType.cast<ValType>().getWidth() <= dstType.cast<ValType>().getWidth()) in verifyTruncateOp()
1068 APInt::getZero(floatTy.getWidth())); in fold()
1094 APInt::getZero(floatTy.getWidth())); in fold()
1119 APSInt api(intTy.getWidth(), /*isUnsigned=*/true); in fold()
1145 APSInt api(intTy.getWidth(), /*isUnsigned=*/false); in fold()
1513 auto intWidth = intTy.getWidth(); in matchAndRewrite()
1639 APInt::getZero(floatTy.getWidth())); in matchAndRewrite()
1969 APInt::getAllOnes(resultType.cast<IntegerType>().getWidth())); in getIdentityValueAttr()
[all …]
/llvm-project-15.0.7/llvm/unittests/ADT/
H A DAPFixedPointTest.cpp137 APSInt::getMaxValue(Sema.getWidth(), !Sema.isSigned())); in CheckUnpaddedMax()
142 APSInt::getMaxValue(Sema.getWidth(), !Sema.isSigned()) >> 1); in CheckPaddedMax()
147 APSInt::getMinValue(Sema.getWidth(), !Sema.isSigned())); in CheckMin()
198 APFixedPoint ValWithFract(APInt(Sema.getWidth(), in CheckIntPart()
206 APInt(Sema.getWidth(), (1ULL << (Scale - 1)), Sema.isSigned()), Sema); in CheckIntPart()
211 APInt(Sema.getWidth(), (IntPart << Scale), Sema.isSigned()), Sema); in CheckIntPart()
217 APInt(Sema.getWidth(), (IntPart << Scale), Sema.isSigned()), Sema); in CheckIntPart()
/llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/Utils/
H A DUtils.cpp78 if (targetIntegerType.getWidth() > valueIntegerType.getWidth()) in getValueOrCreateCastToIndexLike()
/llvm-project-15.0.7/mlir/lib/Dialect/Quant/IR/
H A DTypeParser.cpp37 storageTypeWidth = type.getWidth(); in parseStorageType()
69 isSigned, storageType.getWidth()); in parseStorageRange()
71 isSigned, storageType.getWidth()); in parseStorageRange()
/llvm-project-15.0.7/mlir/lib/Dialect/SparseTensor/Transforms/
H A DCodegenUtils.cpp41 return overheadTypeEncoding(intTp.getWidth()); in overheadTypeEncoding()
167 return builder.getIntegerAttr(tp, APInt(intTp.getWidth(), 1)); in getOneAttr()
/llvm-project-15.0.7/mlir/lib/Conversion/GPUToVulkan/
H A DConvertLaunchFuncToVulkanCalls.cpp140 if (intType.getWidth() == 32) in stringifyType()
142 if (intType.getWidth() == 16) in stringifyType()
144 if (intType.getWidth() == 8) in stringifyType()
/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DFixedPointBuilder.h35 unsigned SrcWidth = SrcSema.getWidth(); in Convert()
36 unsigned DstWidth = DstSema.getWidth(); in Convert()
119 C.getWidth() + (unsigned)(BothPadded && C.isSaturated()), C.getScale(), in getCommonBinopSemantic()
200 Type *ResultTy = B.getIntNTy(DstSema.getWidth()); in CreateFloatingToFixed()
/llvm-project-15.0.7/llvm/lib/Transforms/Vectorize/
H A DLoopVectorizationLegality.cpp148 getWidth() == ElementCount::getFixed(1) && getInterleave() == 1; in LoopVectorizeHints()
221 R << ", Vector Width=" << NV("VectorWidth", getWidth()); in emitRemarkWithHints()
232 if (getWidth() == ElementCount::getFixed(1)) in vectorizeAnalysisPassName()
236 if (getForce() == LoopVectorizeHints::FK_Undefined && getWidth().isZero()) in vectorizeAnalysisPassName()
244 ElementCount EC = getWidth(); in allowReordering()
/llvm-project-15.0.7/mlir/lib/Conversion/ArithmeticToLLVM/
H A DArithmeticToLLVM.cpp140 unsigned targetBits = targetElementType.getWidth(); in matchAndRewrite()
141 unsigned sourceBits = sourceElementType.getWidth(); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Interfaces/
H A DDataLayoutInterfaces.cpp98 auto iter = sortedParams.lower_bound(intType.getWidth()); in findEntryForIntegerType()
115 return intType.getWidth() < 64 in getIntegerTypeABIAlignment()
116 ? llvm::PowerOf2Ceil(llvm::divideCeil(intType.getWidth(), 8)) in getIntegerTypeABIAlignment()
H A DInferIntRangeInterface.cpp33 return integerType.getWidth(); in getStorageBitwidth()
/llvm-project-15.0.7/flang/lib/Lower/
H A DMangler.cpp255 return "i" + std::to_string(i.getWidth()); in typeToString()
264 return "f" + std::to_string(f.getWidth()); in typeToString()
/llvm-project-15.0.7/mlir/lib/ExecutionEngine/
H A DJitRunner.cpp261 if (!resultType || resultType.getWidth() != 32) in checkCompatibleReturnType()
271 if (!resultType || resultType.getWidth() != 64) in checkCompatibleReturnType()
/llvm-project-15.0.7/clang/include/clang/CodeGen/
H A DSwiftCallingConv.h49 CharUnits getWidth() const { in getWidth() function
/llvm-project-15.0.7/mlir/lib/Dialect/Linalg/IR/
H A DLinalgOps.cpp442 if (toIntType.getWidth() > fromIntType.getWidth()) { in cast()
447 if (toIntType.getWidth() < fromIntType.getWidth()) in cast()
459 if (toFloatType.getWidth() > fromFloatType.getWidth()) in cast()
461 if (toFloatType.getWidth() < fromFloatType.getWidth()) in cast()
/llvm-project-15.0.7/mlir/lib/Target/Cpp/
H A DTranslateToCpp.cpp961 switch (iType.getWidth()) { in emitType()
969 return (os << "uint" << iType.getWidth() << "_t"), success(); in emitType()
971 return (os << "int" << iType.getWidth() << "_t"), success(); in emitType()
977 switch (fType.getWidth()) { in emitType()
/llvm-project-15.0.7/clang/include/clang/AST/
H A DAbstractBasicWriter.h169 asImpl().writeUInt32(sema.getWidth()); in writeFixedPointSemantics()
/llvm-project-15.0.7/mlir/lib/Target/LLVMIR/
H A DTypeToLLVM.cpp104 return llvm::IntegerType::get(context, type.getWidth()); in translate()
/llvm-project-15.0.7/mlir/lib/Conversion/SCFToOpenMP/
H A DSCFToOpenMP.cpp162 unsigned bitwidth = intType.getWidth(); in minMaxValueForSignedInt()
172 unsigned bitwidth = intType.getWidth(); in minMaxValueForUnsignedInt()
/llvm-project-15.0.7/mlir/test/lib/Dialect/Test/
H A DTestInterfaces.td78 "unsigned", "getBitwidth", (ins), "", "return $_type.getWidth();">,

123