| /freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 39 class APInt; variable 41 inline APInt operator-(APInt); 78 class [[nodiscard]] APInt { 111 APInt(unsigned numBits, uint64_t val, bool isSigned = false, 148 LLVM_ABI APInt(unsigned numBits, ArrayRef<uint64_t> bigVal); 157 LLVM_ABI APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); 170 LLVM_ABI APInt(unsigned numBits, StringRef str, uint8_t radix); 173 explicit APInt() { U.VAL = 0; } in APInt() function 176 APInt(const APInt &that) : BitWidth(that.BitWidth) { in APInt() function 184 APInt(APInt &&that) : BitWidth(that.BitWidth) { in APInt() function [all …]
|
| H A D | APSInt.h | 24 class [[nodiscard]] APSInt : public APInt { 33 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {} 35 explicit APSInt(APInt I, bool isUnsigned = true) 36 : APInt(std::move(I)), IsUnsigned(isUnsigned) {} in APInt() function 50 bool isNegative() const { return isSigned() && APInt::isNegative(); } in isNegative() 65 APSInt &operator=(APInt RHS) { 67 APInt::operator=(std::move(RHS)); 73 APInt::operator=(RHS); 85 APInt::toString(Str, Radix, isSigned()); 87 using APInt::toString; [all …]
|
| H A D | APFloat.h | 145 typedef APInt::WordType integerPart; 146 static constexpr unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD; 413 LLVM_ABI IEEEFloat(const fltSemantics &, const APInt &); 462 LLVM_ABI opStatus convertFromAPInt(const APInt &, bool, roundingMode); 470 LLVM_ABI APInt bitcastToAPInt() const; 645 const APInt *fill = nullptr); 735 template <const fltSemantics &S> APInt convertIEEEFloatToAPInt() const; 736 APInt convertHalfAPFloatToAPInt() const; 737 APInt convertBFloatAPFloatToAPInt() const; 738 APInt convertFloatAPFloatToAPInt() const; [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | APInt.cpp | 74 void APInt::initSlowCase(uint64_t val, bool isSigned) { in initSlowCase() 86 void APInt::initSlowCase(const APInt& that) { in initSlowCase() 91 void APInt::initFromArray(ArrayRef<uint64_t> bigVal) { in initFromArray() 107 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) : BitWidth(numBits) { in APInt() function in APInt 111 APInt::APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]) in APInt() function in APInt 116 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() function in APInt 121 void APInt::reallocate(unsigned NewBitWidth) { in reallocate() 140 void APInt::assignSlowCase(const APInt &RHS) { in assignSlowCase() 156 void APInt::Profile(FoldingSetNodeID& ID) const { in Profile() 169 bool APInt::isAligned(Align A) const { in isAligned() [all …]
|
| H A D | DivisionByConstantInfo.cpp | 21 SignedDivisionByConstantInfo SignedDivisionByConstantInfo::get(const APInt &D) { in get() 27 APInt Delta; in get() 28 APInt SignedMin = APInt::getSignedMinValue(D.getBitWidth()); in get() 31 APInt AD = D.abs(); in get() 32 APInt T = SignedMin + (D.lshr(D.getBitWidth() - 1)); in get() 33 APInt ANC = T - 1 - T.urem(AD); // absolute value of NC in get() 35 APInt Q1, R1, Q2, R2; in get() 37 APInt::udivrem(SignedMin, ANC, Q1, R1); in get() 39 APInt::udivrem(SignedMin, AD, Q2, R2); in get() 74 UnsignedDivisionByConstantInfo::get(const APInt &D, unsigned LeadingZeros, in get() [all …]
|
| H A D | KnownBits.cpp | 23 APInt Zero = Val.Zero; in flipSignBit() 24 APInt One = Val.One; in flipSignBit() 33 APInt PossibleSumZero = LHS.getMaxValue() + RHS.getMaxValue() + !CarryZero; in computeForAddCarry() 34 APInt PossibleSumOne = LHS.getMinValue() + RHS.getMinValue() + CarryOne; in computeForAddCarry() 37 APInt CarryKnownZero = ~(PossibleSumZero ^ LHS.Zero ^ RHS.Zero); in computeForAddCarry() 38 APInt CarryKnownOne = PossibleSumOne ^ LHS.One ^ RHS.One; in computeForAddCarry() 41 APInt LHSKnownUnion = LHS.Zero | LHS.One; in computeForAddCarry() 42 APInt RHSKnownUnion = RHS.Zero | RHS.One; in computeForAddCarry() 43 APInt CarryKnownUnion = std::move(CarryKnownZero) | CarryKnownOne; in computeForAddCarry() 44 APInt Known = std::move(LHSKnownUnion) & RHSKnownUnion & CarryKnownUnion; in computeForAddCarry() [all …]
|
| H A D | APFloat.cpp | 680 lsb = APInt::tcLSB(parts, partCount); in lostFractionThroughTruncation() 688 APInt::tcExtractBit(parts, bits - 1)) in lostFractionThroughTruncation() 702 APInt::tcShiftRight(dst, parts, bits); in shiftRight() 811 APInt::tcFullMultiply(pow5, pow5 - partsCount, pow5 - partsCount, in powerOf5() 821 APInt::tcFullMultiply(p2, p1, pow5, result, partsCount); in powerOf5() 837 APInt::tcAssign(dst, p1, result); in powerOf5() 933 APInt::tcAssign(significandParts(), rhs.significandParts(), in copySignificand() 940 void IEEEFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) { in makeNaN() 955 APInt fill_storage; in makeNaN() 962 fill_storage = APInt::getZero(semantics->precision - 1); in makeNaN() [all …]
|
| H A D | SlowDynamicAPInt.cpp | 20 SlowDynamicAPInt::SlowDynamicAPInt(const APInt &Val) : Val(Val) {} in SlowDynamicAPInt() 117 static unsigned getMaxWidth(const APInt &A, const APInt &B) { in getMaxWidth() 159 APInt runOpWithExpandOnOverflow( in runOpWithExpandOnOverflow() 160 const APInt &A, const APInt &B, in runOpWithExpandOnOverflow() argument 161 function_ref<APInt(const APInt &, const APInt &, bool &Overflow)> Op) { in runOpWithExpandOnOverflow() argument 164 APInt Ret = Op(A.sext(Width), B.sext(Width), Overflow); in runOpWithExpandOnOverflow() 176 runOpWithExpandOnOverflow(Val, O.Val, std::mem_fn(&APInt::sadd_ov))); in operator +() 180 runOpWithExpandOnOverflow(Val, O.Val, std::mem_fn(&APInt::ssub_ov))); in operator -() 184 runOpWithExpandOnOverflow(Val, O.Val, std::mem_fn(&APInt::smul_ov))); in operator *() 188 runOpWithExpandOnOverflow(Val, O.Val, std::mem_fn(&APInt::sdiv_ov))); in operator /() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/IR/ |
| H A D | ConstantRange.cpp | 46 : Lower(Full ? APInt::getMaxValue(BitWidth) : APInt::getMinValue(BitWidth)), in ConstantRange() 49 ConstantRange::ConstantRange(APInt V) in ConstantRange() 52 ConstantRange::ConstantRange(APInt L, APInt U) in ConstantRange() 74 APInt Lower = Known.getMinValue(), Upper = Known.getMaxValue(); in fromKnownBits() 87 APInt Min = getUnsignedMin(); in toKnownBits() 88 APInt Max = getUnsignedMax(); in toKnownBits() 100 APInt Zero = APInt::getZero(BW), One = APInt(BW, 1); in splitPosNeg() 101 APInt SignedMin = APInt::getSignedMinValue(BW); in splitPosNeg() 125 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion() 128 return ConstantRange(APInt::getMinValue(W), std::move(UMax)); in makeAllowedICmpRegion() [all …]
|
| H A D | Operator.cpp | 114 const DataLayout &DL, APInt &Offset, in accumulateConstantOffset() 115 function_ref<bool(Value &, APInt &)> ExternalAnalysis) const { in accumulateConstantOffset() 126 APInt &Offset, function_ref<bool(Value &, APInt &)> ExternalAnalysis) { in accumulateConstantOffset() 138 auto AccumulateOffset = [&](APInt Index, uint64_t Size) -> bool { in accumulateConstantOffset() 141 APInt IndexedSize(Offset.getBitWidth(), Size, /*isSigned=*/false, in accumulateConstantOffset() 150 APInt OffsetPlus = Index.smul_ov(IndexedSize, Overflow); in accumulateConstantOffset() 183 APInt(Offset.getBitWidth(), SL->getElementOffset(ElementIdx)), in accumulateConstantOffset() 198 APInt AnalysisIndex; in accumulateConstantOffset() 210 SmallMapVector<Value *, APInt, 4> &VariableOffsets, in collectOffset() argument 211 APInt &ConstantOffset) const { in collectOffset() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | DemandedBits.cpp | 54 const APInt &AOut, APInt &AB, KnownBits &Known, KnownBits &Known2, in determineLiveOperandBits() 103 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits() 113 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits() 119 const APInt *SA; in determineLiveOperandBits() 145 AB = APInt::getBitsSetFrom(BitWidth, AOut.countr_zero()); in determineLiveOperandBits() 170 AB = APInt::getLowBitsSet(BitWidth, AOut.getActiveBits()); in determineLiveOperandBits() 174 const APInt *ShiftAmtC; in determineLiveOperandBits() 183 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt+1); in determineLiveOperandBits() 185 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt); in determineLiveOperandBits() 191 const APInt *ShiftAmtC; in determineLiveOperandBits() [all …]
|
| H A D | CmpInstAnalysis.cpp | 82 const APInt *OrigC; in decomposeBitTestICmp() 93 APInt C = *OrigC; in decomposeBitTestICmp() 108 Result.Mask = APInt::getSignMask(C.getBitWidth()); in decomposeBitTestICmp() 109 Result.C = APInt::getZero(C.getBitWidth()); in decomposeBitTestICmp() 114 APInt FlippedSign = C ^ APInt::getSignMask(C.getBitWidth()); in decomposeBitTestICmp() 118 Result.C = APInt::getSignMask(C.getBitWidth()); in decomposeBitTestICmp() 137 Result.C = APInt::getZero(C.getBitWidth()); in decomposeBitTestICmp() 155 const APInt *AndC; in decomposeBitTestICmp() 207 Result.Mask = APInt(BitWidth, 1); in decomposeBitTest() 208 Result.C = APInt::getZero(BitWidth); in decomposeBitTest()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | ConstantRange.h | 48 APInt Lower, Upper; 65 LLVM_ABI ConstantRange(APInt Value); 70 LLVM_ABI ConstantRange(APInt Lower, APInt Upper); 84 static ConstantRange getNonEmpty(APInt Lower, APInt Upper) { in getNonEmpty() 130 const APInt &Other); 181 makeExactNoWrapRegion(Instruction::BinaryOps BinOp, const APInt &Other, 187 LLVM_ABI static ConstantRange makeMaskNotEqualRange(const APInt &Mask, 188 const APInt &C); 201 LLVM_ABI bool getEquivalentICmp(CmpInst::Predicate &Pred, APInt &RHS) const; 205 LLVM_ABI void getEquivalentICmp(CmpInst::Predicate &Pred, APInt &RHS, [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/ |
| H A D | GISelValueTracking.h | 44 const APInt &DemandedElts, unsigned Depth = 0); 47 const APInt &DemandedElts, unsigned Depth = 0); 53 const APInt &DemandedElts, 57 void computeKnownFPClass(Register R, const APInt &DemandedElts, 70 const APInt &DemandedElts, 73 unsigned computeNumSignBits(Register R, const APInt &DemandedElts, 79 KnownBits getKnownBits(Register R, const APInt &DemandedElts, 84 APInt getKnownZeroes(Register R); 85 APInt getKnownOnes(Register R); 90 bool maskedValueIsZero(Register Val, const APInt &Mask) { in maskedValueIsZero() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | DemandedBits.h | 55 LLVM_ABI APInt getDemandedBits(Instruction *I); 58 LLVM_ABI APInt getDemandedBits(Use *U); 70 LLVM_ABI static APInt determineLiveOperandBitsAdd(unsigned OperandNo, 71 const APInt &AOut, 77 LLVM_ABI static APInt determineLiveOperandBitsSub(unsigned OperandNo, 78 const APInt &AOut, 86 const APInt &AOut, APInt &AB, 97 DenseMap<Instruction *, APInt> AliveBits;
|
| H A D | MemoryBuiltins.h | 119 LLVM_ABI std::optional<APInt> getAllocSize( 224 struct SizeOffsetAPInt : public SizeOffsetType<APInt, SizeOffsetAPInt> { 226 SizeOffsetAPInt(APInt Size, APInt Offset) in SizeOffsetAPInt() 229 static bool known(const APInt &V) { return V.getBitWidth() > 1; } in known() 239 APInt Before; /// Number of allocated bytes before this point. 240 APInt After; /// Number of allocated bytes after this point. 243 OffsetSpan(APInt Before, APInt After) : Before(Before), After(After) {} in OffsetSpan() 255 static bool known(const APInt &V) { return V.getBitWidth() > 1; } in known() 266 APInt Zero; 270 APInt align(APInt Size, MaybeAlign Align); [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/FileCheck/ |
| H A D | FileCheckImpl.h | 97 LLVM_ABI_FOR_TEST Expected<std::string> getMatchingString(APInt Value) const; 101 LLVM_ABI_FOR_TEST APInt valueFromStringRepr(StringRef StrVal, 120 LLVM_ABI_FOR_TEST Expected<APInt> exprAdd(const APInt &Lhs, const APInt &Rhs, 122 LLVM_ABI_FOR_TEST Expected<APInt> exprSub(const APInt &Lhs, const APInt &Rhs, 124 LLVM_ABI_FOR_TEST Expected<APInt> exprMul(const APInt &Lhs, const APInt &Rhs, 126 LLVM_ABI_FOR_TEST Expected<APInt> exprDiv(const APInt &Lhs, const APInt &Rhs, 128 Expected<APInt> exprMax(const APInt &Lhs, const APInt &Rhs, bool &Overflow); 129 Expected<APInt> exprMin(const APInt &Lhs, const APInt &Rhs, bool &Overflow); 145 virtual Expected<APInt> eval() const = 0; 161 APInt Value; [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | LowerSwitch.cpp | 52 APInt Low, High; 117 const APInt &NumMergedCases) { in FixPhis() 123 APInt LocalNumMergedCases = NumMergedCases; in FixPhis() 208 APInt Range = Leaf.High->getValue() - Leaf.Low->getValue(); in NewLeafBlock() 209 for (APInt j(Range.getBitWidth(), 0, false); j.ult(Range); ++j) { in NewLeafBlock() 240 APInt NumMergedCases = UpperBound->getValue() - LowerBound->getValue(); in SwitchConvert() 271 APInt GapLow = LHS.back().High->getValue() + 1; in SwitchConvert() 272 APInt GapHigh = NewLowerBound->getValue() - 1; in SwitchConvert() 325 const APInt &nextValue = J->Low->getValue(); in Clusterify() 326 const APInt ¤tValue = I->High->getValue(); in Clusterify() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/ |
| H A D | IntegralAP.h | 29 using APInt = llvm::APInt; variable 46 static T truncateCast(const APInt &V) { in truncateCast() 49 APInt Extended; in truncateCast() 62 APInt getValue() const { in getValue() 64 return APInt(BitWidth, Val, Signed); in getValue() 65 unsigned NumWords = llvm::APInt::getNumWords(BitWidth); in getValue() 66 return llvm::APInt(BitWidth, NumWords, Memory); in getValue() 78 void copy(const APInt &V) { in copy() 100 IntegralAP(const APInt &V) : BitWidth(V.getBitWidth()) { in IntegralAP() 134 assert(APInt::getNumWords(NumBits) == 1); [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSimplifyDemanded.cpp | 43 const APInt &Demanded) { in ShrinkDemandedConstant() 49 const APInt *C; in ShrinkDemandedConstant() 76 APInt DemandedMask(APInt::getAllOnes(Known.getBitWidth())); in SimplifyDemandedInstructionBits() 96 const APInt &DemandedMask, in SimplifyDemandedBits() 165 const APInt &DemandedMask, in SimplifyDemandedUseBits() 196 auto simplifyOperandsBasedOnUnusedHighBits = [&](APInt &DemandedFromOps) { in SimplifyDemandedUseBits() 200 DemandedFromOps = APInt::getLowBitsSet(BitWidth, BitWidth - NLZ); in SimplifyDemandedUseBits() 341 const APInt *C; in SimplifyDemandedUseBits() 363 APInt NewMask = ~(LHSKnown.One & RHSKnown.One & DemandedMask); in SimplifyDemandedUseBits() 387 const APInt &DemandedMask) { in SimplifyDemandedUseBits() [all …]
|
| H A D | InstCombineInternal.h | 48 class APInt; variable 569 Value *SimplifyDemandedUseBits(Instruction *I, const APInt &DemandedMask, 574 const APInt &DemandedMask, KnownBits &Known, 582 const APInt &DemandedMask, 590 Instruction *Shr, const APInt &ShrOp1, Instruction *Shl, 591 const APInt &ShlOp1, const APInt &DemandedMask, KnownBits &Known); 598 Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, 599 APInt &PoisonElts, unsigned Depth = 0, 704 Instruction *foldICmpAddOpConst(Value *X, const APInt &C, CmpPredicate Pred); 715 const APInt &C); [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/M68k/MCTargetDesc/ |
| H A D | M68kMCCodeEmitter.cpp | 44 APInt &Inst, APInt &Scratch, 48 unsigned InsertPos, APInt &Value, 54 APInt &Value, SmallVectorImpl<MCFixup> &Fixups, 59 APInt &Value, SmallVectorImpl<MCFixup> &Fixups, 63 APInt &Value, SmallVectorImpl<MCFixup> &Fixups, 67 unsigned InsertPos, APInt &Value, 128 unsigned InsertPos, APInt &Value, in encodeRelocImm() 153 unsigned InsertPos, APInt &Value, in encodePCRelImm() 187 unsigned InsertPos, APInt &Value, in encodeFPSYSSelect() 207 const MCInst &MI, unsigned OpIdx, unsigned InsertPos, APInt &Value, in encodeInverseMoveMask() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
| H A D | HexagonConstPropagation.cpp | 339 bool constToInt(const Constant *C, APInt &Val) const; 340 const ConstantInt *intToConst(const APInt &Val) const; 346 bool evaluateCMPri(uint32_t Cmp, const RegSubRegPair &R1, const APInt &A2, 350 bool evaluateCMPii(uint32_t Cmp, const APInt &A1, const APInt &A2, 352 bool evaluateCMPpi(uint32_t Cmp, uint32_t Props, const APInt &A2, 363 bool evaluateANDri(const RegSubRegPair &R1, const APInt &A2, 365 bool evaluateANDii(const APInt &A1, const APInt &A2, APInt &Result); 368 bool evaluateORri(const RegSubRegPair &R1, const APInt &A2, 370 bool evaluateORii(const APInt &A1, const APInt &A2, APInt &Result); 373 bool evaluateXORri(const RegSubRegPair &R1, const APInt &A2, [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
| H A D | CheckedArithmetic.h | 30 llvm::APInt ALHS(sizeof(T) * 8, LHS, Signed); 31 llvm::APInt ARHS(sizeof(T) * 8, RHS, Signed); 33 llvm::APInt Out = (ALHS.*Op)(ARHS, Overflow); 48 return checkedOp(LHS, RHS, &llvm::APInt::sadd_ov); in checkedAdd() 57 return checkedOp(LHS, RHS, &llvm::APInt::ssub_ov); in checkedSub() 66 return checkedOp(LHS, RHS, &llvm::APInt::smul_ov); in checkedMul() 86 return checkedOp(LHS, RHS, &llvm::APInt::uadd_ov, /*Signed=*/false); in checkedAddUnsigned() 95 return checkedOp(LHS, RHS, &llvm::APInt::umul_ov, /*Signed=*/false); in checkedMulUnsigned()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
| H A D | X86ShuffleDecodeConstantPool.cpp | 27 APInt &UndefElts, in extractConstantMask() 55 UndefElts = APInt(NumMaskElts, 0); in extractConstantMask() 79 APInt UndefBits(CstSizeInBits, 0); in extractConstantMask() 80 APInt MaskBits(CstSizeInBits, 0); in extractConstantMask() 99 APInt EltUndef = UndefBits.extractBits(MaskEltSizeInBits, BitOffset); in extractConstantMask() 109 APInt EltBits = MaskBits.extractBits(MaskEltSizeInBits, BitOffset); in extractConstantMask() 123 APInt UndefElts; in DecodePSHUFBMask() 162 APInt UndefElts; in DecodeVPERMILPMask() 198 APInt UndefElts; in DecodeVPERMIL2PMask() 252 APInt UndefElts; in DecodeVPPERMMask()
|