| /llvm-project-15.0.7/mlir/include/mlir/Dialect/Quant/ |
| H A D | UniformSupport.h | 76 uint32_t storageBitWidth, bool isSigned) in UniformQuantizedValueConverter() argument 80 storageBitWidth(storageBitWidth), isSigned(isSigned), in UniformQuantizedValueConverter() 86 uint32_t storageBitWidth, bool isSigned) in UniformQuantizedValueConverter() argument 91 storageBitWidth(storageBitWidth), isSigned(isSigned), in UniformQuantizedValueConverter() 115 llvm::APSInt result(storageBitWidth, !isSigned); in quantizeFloatToInt() 123 return isSigned ? qValue.getSExtValue() : qValue.getZExtValue(); in quantizeFloatToInt64() 145 if (isSigned) { in quantizeF32ToInt8() 168 const bool isSigned; variable 185 isSigned(uniformType.isSigned()), in UniformQuantizedPerAxisValueConverter() 205 storageBitWidth, isSigned); in getPerChunkConverter() [all …]
|
| H A D | QuantTypes.h | 70 static int64_t getDefaultMinimumForInteger(bool isSigned, in getDefaultMinimumForInteger() argument 72 if (isSigned) { in getDefaultMinimumForInteger() 80 static int64_t getDefaultMaximumForInteger(bool isSigned, in getDefaultMaximumForInteger() argument 82 if (isSigned) { in getDefaultMaximumForInteger() 105 bool isSigned() const { in isSigned() function 297 bool isFixedPoint() const { return isSigned() && getZeroPoint() == 0; } in isFixedPoint() 372 if (!isSigned()) in isFixedPoint()
|
| H A D | FakeQuantSupport.h | 54 bool isSigned = false); 63 bool isSigned = false);
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | APFixedPoint.cpp | 51 if (!DstSema.isSigned() && NewVal.isSigned() && NewVal.isNegative()) { in convert() 67 bool ThisSigned = Val.isSigned(); in compare() 116 bool IsUnsigned = !Sema.isSigned(); in getMax() 157 bool ResultIsSigned = isSigned() || Other.isSigned(); in getCommonSemantics() 235 if (CommonFXSema.isSigned()) { in mul() 251 if (CommonFXSema.isSigned()) in mul() 292 if (CommonFXSema.isSigned()) { in div() 304 if (CommonFXSema.isSigned()) { in div() 342 if (Sema.isSigned()) in shl() 401 (!isSigned() && Val != 0) || (isSigned() && Val.isMinSignedValue()); in negate() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/ADT/ |
| H A D | StringExtrasTest.cpp | 241 bool isSigned; in TEST() local 249 isSigned = false; in TEST() 251 EXPECT_EQ(toString(APInt(8, 255, isSigned), 8, isSigned, true), "0377"); in TEST() 252 EXPECT_EQ(toString(APInt(8, 255, isSigned), 10, isSigned, true), "255"); in TEST() 253 EXPECT_EQ(toString(APInt(8, 255, isSigned), 16, isSigned, true), "0xFF"); in TEST() 254 EXPECT_EQ(toString(APInt(8, 255, isSigned), 36, isSigned, false), "73"); in TEST() 256 isSigned = true; in TEST() 257 EXPECT_EQ(toString(APInt(8, 255, isSigned), 2, isSigned, true), "-0b1"); in TEST() 258 EXPECT_EQ(toString(APInt(8, 255, isSigned), 8, isSigned, true), "-01"); in TEST() 259 EXPECT_EQ(toString(APInt(8, 255, isSigned), 10, isSigned, true), "-1"); in TEST() [all …]
|
| H A D | APSIntTest.cpp | 44 EXPECT_TRUE(APSInt::get(7).isSigned()); in TEST() 48 EXPECT_TRUE(APSInt::get(-7).isSigned()); in TEST() 67 EXPECT_TRUE(APSInt(APInt(3, 7), false).isSigned()); in TEST() 69 EXPECT_TRUE(APSInt(APInt(4, 7), false).isSigned()); in TEST() 71 EXPECT_TRUE(APSInt(APInt(4, -7), false).isSigned()); in TEST()
|
| H A D | APFixedPointTest.cpp | 137 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() 200 Sema.isSigned()), 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() 215 if (Sema.isSigned()) { in CheckIntPart() 217 APInt(Sema.getWidth(), (IntPart << Scale), Sema.isSigned()), Sema); in CheckIntPart() 609 ASSERT_TRUE(Fixed.getValue().isSigned()); in TEST()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Quant/IR/ |
| H A D | TypeParser.cpp | 36 isSigned = !type.isUnsigned(); in parseStorageType() 48 isSigned = false; in parseStorageType() 69 isSigned, storageType.getWidth()); in parseStorageRange() 71 isSigned, storageType.getWidth()); in parseStorageRange() 133 bool isSigned = false; in parseAnyType() local 134 storageType = parseStorageType(parser, isSigned); in parseAnyType() 138 if (isSigned) { in parseAnyType() 212 bool isSigned = false; in parseUniformType() local 217 if (isSigned) { in parseUniformType() 342 bool isSigned = type.isSigned(); in printStorageType() local [all …]
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Quant/Utils/ |
| H A D | FakeQuantSupport.cpp | 16 bool isSigned, MLIRContext *ctx, in getDefaultStorageParams() argument 22 if (isSigned) { in getDefaultStorageParams() 31 if (isSigned) { in getDefaultStorageParams() 40 if (isSigned) { in getDefaultStorageParams() 110 Type expressedType, bool isSigned) { in fakeQuantAttrsToType() argument 112 unsigned flags = isSigned ? QuantizationFlags::Signed : 0; in fakeQuantAttrsToType() 116 if (getDefaultStorageParams(numBits, narrowRange, isSigned, ctx, storageType, in fakeQuantAttrsToType() 142 Type expressedType, bool isSigned) { in fakeQuantAttrsToType() argument 154 if (getDefaultStorageParams(numBits, narrowRange, isSigned, ctx, storageType, in fakeQuantAttrsToType() 180 unsigned flags = isSigned ? QuantizationFlags::Signed : 0; in fakeQuantAttrsToType()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/ |
| H A D | APSIntType.cpp | 20 Value.isSigned() && Value.isNegative()) in testInRange() 25 if (Value.isSigned() && !IsUnsigned) in testInRange() 35 if (Value.isSigned()) in testInRange() 44 if (Value.isSigned() && Value.isNegative()) in testInRange()
|
| H A D | BasicValueFactory.cpp | 279 if (V2.isSigned() && V2.isNegative()) in evalAPSInt() 288 if (V1.isSigned() && V1.isNegative()) in evalAPSInt() 291 if (V1.isSigned() && Amt > V1.countLeadingZeros()) in evalAPSInt() 302 if (V2.isSigned() && V2.isNegative()) in evalAPSInt()
|
| /llvm-project-15.0.7/llvm/include/llvm/IR/ |
| H A D | FixedPointBuilder.h | 39 bool SrcIsSigned = SrcSema.isSigned(); in Convert() 40 bool DstIsSigned = DstSema.isSigned(); in Convert() 120 C.isSigned(), C.isSaturated(), BothPadded); in getCommonBinopSemantic() 178 Result = SrcSema.isSigned() ? B.CreateSIToFP(Src, OpTy) in CreateFixedToFloating() 190 bool UseSigned = DstSema.isSigned() || DstSema.hasUnsignedPadding(); in CreateFloatingToFixed() 229 bool UseSigned = CommonSema.isSigned() || CommonSema.hasUnsignedPadding(); in CreateAdd() 342 bool UseSigned = LHSSema.isSigned() || LHSSema.hasUnsignedPadding(); in CreateShl() 410 return CommonSema.isSigned() ? B.CreateICmpSLT(WideLHS, WideRHS) in CreateLT() 426 return CommonSema.isSigned() ? B.CreateICmpSLE(WideLHS, WideRHS) in CreateLE() 442 return CommonSema.isSigned() ? B.CreateICmpSGT(WideLHS, WideRHS) in CreateGT() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/ADT/ |
| H A D | APFixedPoint.h | 46 bool isSigned() const { return IsSigned; } in isSigned() function 103 : Val(Val, !Sema.isSigned()), Sema(Sema) { in APFixedPoint() 109 : APFixedPoint(APInt(Sema.getWidth(), Val, Sema.isSigned()), Sema) {} in APFixedPoint() 114 APSInt getValue() const { return APSInt(Val, !Sema.isSigned()); } in getValue() 118 inline bool isSigned() const { return Sema.isSigned(); } in isSigned() function
|
| H A D | APSInt.h | 49 bool isNegative() const { return isSigned() && APInt::isNegative(); } in isNegative() 77 bool isSigned() const { return !IsUnsigned; } in isSigned() function 84 APInt::toString(Str, Radix, isSigned()); 91 return isSigned() ? getSExtValue() : getZExtValue(); in getExtValue() 303 if (I1.getBitWidth() == I2.getBitWidth() && I1.isSigned() == I2.isSigned()) in compareValues() 314 if (I1.isSigned()) { in compareValues() 315 assert(!I2.isSigned() && "Expected signed mismatch"); in compareValues() 319 assert(I2.isSigned() && "Expected signed mismatch"); in compareValues() 343 I.print(OS, I.isSigned());
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | CmpInstAnalysis.cpp | 59 return (CmpInst::isSigned(P1) == CmpInst::isSigned(P2)) || in predicatesFoldable() 60 (CmpInst::isSigned(P1) && ICmpInst::isEquality(P2)) || in predicatesFoldable() 61 (CmpInst::isSigned(P2) && ICmpInst::isEquality(P1)); in predicatesFoldable()
|
| /llvm-project-15.0.7/mlir/lib/CAPI/Dialect/ |
| H A D | Quant.cpp | 30 int64_t mlirQuantizedTypeGetDefaultMinimumForInteger(bool isSigned, in mlirQuantizedTypeGetDefaultMinimumForInteger() argument 32 return quant::QuantizedType::getDefaultMinimumForInteger(isSigned, in mlirQuantizedTypeGetDefaultMinimumForInteger() 36 int64_t mlirQuantizedTypeGetDefaultMaximumForInteger(bool isSigned, in mlirQuantizedTypeGetDefaultMaximumForInteger() argument 38 return quant::QuantizedType::getDefaultMaximumForInteger(isSigned, in mlirQuantizedTypeGetDefaultMaximumForInteger() 51 return unwrap(type).cast<quant::QuantizedType>().isSigned(); in mlirQuantizedTypeIsSigned()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Tosa/Utils/ |
| H A D | QuantUtils.cpp | 270 bool isSigned, BoolAttr narrowRange) { in buildQTypeFromMinMax() argument 310 narrowRange.getValue(), convfunc.expressedType, isSigned); in buildQTypeFromMinMax() 318 max[0], narrowRange.getValue(), convfunc.expressedType, isSigned); in buildQTypeFromMinMax() 338 bool isSigned, BoolAttr narrowRange) { in buildQTypeAttrFromMinMax() argument 342 isSigned, narrowRange)); in buildQTypeAttrFromMinMax()
|
| /llvm-project-15.0.7/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | SMTConv.h | 94 bool isSigned) { in fromBinOp() argument 104 return isSigned ? Solver->mkBVSDiv(LHS, RHS) : Solver->mkBVUDiv(LHS, RHS); in fromBinOp() 107 return isSigned ? Solver->mkBVSRem(LHS, RHS) : Solver->mkBVURem(LHS, RHS); in fromBinOp() 125 return isSigned ? Solver->mkBVSlt(LHS, RHS) : Solver->mkBVUlt(LHS, RHS); in fromBinOp() 128 return isSigned ? Solver->mkBVSgt(LHS, RHS) : Solver->mkBVUgt(LHS, RHS); in fromBinOp() 131 return isSigned ? Solver->mkBVSle(LHS, RHS) : Solver->mkBVUle(LHS, RHS); in fromBinOp() 134 return isSigned ? Solver->mkBVSge(LHS, RHS) : Solver->mkBVUge(LHS, RHS); in fromBinOp() 142 fromBinOp(Solver, LHS, BO_EQ, RHS, isSigned)); in fromBinOp() 514 bool isSigned = Ty->isSignedIntegerOrEnumerationType(); in getZeroExpr() local 521 isSigned); in getZeroExpr() [all …]
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/Tosa/Utils/ |
| H A D | QuantUtils.h | 59 int filterQuantDim, bool isSigned, 66 bool isSigned, BoolAttr narrowRange);
|
| /llvm-project-15.0.7/mlir/lib/Bindings/Python/ |
| H A D | DialectQuant.cpp | 27 [](bool isSigned, unsigned integralWidth) { in populateDialectQuantSubmodule() argument 28 return mlirQuantizedTypeGetDefaultMinimumForInteger(isSigned, in populateDialectQuantSubmodule() 36 [](bool isSigned, unsigned integralWidth) { in populateDialectQuantSubmodule() argument 37 return mlirQuantizedTypeGetDefaultMaximumForInteger(isSigned, in populateDialectQuantSubmodule()
|
| /llvm-project-15.0.7/mlir/lib/IR/ |
| H A D | Types.cpp | 51 return intTy.isSigned(); in isSignedInteger() 57 return intTy.isSigned() && intTy.getWidth() == width; in isSignedInteger()
|
| H A D | BuiltinAttributes.cpp | 1143 bool isSigned) { in isValidIntOrFloat() argument 1162 return intType.isSigned() ? isSigned : !isSigned; in isValidIntOrFloat() 1171 isSigned); in getRawComplex() 1177 bool isSigned) { in getRawIntOrFloat() argument 1179 isInt, isSigned); in getRawIntOrFloat() 1183 bool isSigned) const { in isValidIntOrFloat() 1187 bool isSigned) const { in isValidComplex() 1190 isInt, isSigned); in isValidComplex() 1404 bool isSigned) { in getRawComplex() argument 1407 dataEltSize / 2, isInt, isSigned)); in getRawComplex() [all …]
|
| /llvm-project-15.0.7/mlir/include/mlir-c/Dialect/ |
| H A D | Quant.h | 33 bool isSigned, unsigned integralWidth); 37 bool isSigned, unsigned integralWidth);
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/IR/ |
| H A D | InferIntRangeInterfaceImpls.cpp | 31 const APInt &maxRight, bool isSigned) { in computeBoundsBy() argument 35 return ConstantIntRanges::range(*maybeMin, *maybeMax, isSigned); in computeBoundsBy() 42 ArrayRef<APInt> rhs, bool isSigned) { in minMaxBy() argument 45 isSigned ? APInt::getSignedMaxValue(width) : APInt::getMaxValue(width); in minMaxBy() 47 isSigned ? APInt::getSignedMinValue(width) : APInt::getZero(width); in minMaxBy() 54 min = (isSigned ? result.slt(min) : result.ult(min)) ? result : min; in minMaxBy() 55 max = (isSigned ? result.sgt(max) : result.ugt(max)) ? result : max; in minMaxBy() 58 return ConstantIntRanges::range(min, max, isSigned); in minMaxBy()
|
| /llvm-project-15.0.7/lldb/source/Utility/ |
| H A D | Scalar.cpp | 61 a.IntegralPromote(b.m_integer.getBitWidth(), b.m_integer.isSigned()); in PromoteToMaxType() 200 m_float.convertFromAPInt(m_integer, m_integer.isSigned(), in FloatPromote() 234 return m_integer.isSigned(); in IsSigned() 291 if (ext.isSigned()) in GetAs() 367 if (m_integer.isSigned()) in Float() 387 if (m_integer.isSigned()) in Double()
|