| /openbsd-src/gnu/llvm/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 36 class APInt; variable 38 inline APInt operator-(APInt); 75 class [[nodiscard]] APInt { 108 APInt(unsigned numBits, uint64_t val, bool isSigned = false) 125 APInt(unsigned numBits, ArrayRef<uint64_t> bigVal); 134 APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); 147 APInt(unsigned numBits, StringRef str, uint8_t radix); 150 explicit APInt() { U.VAL = 0; } in APInt() function 153 APInt(const APInt &that) : BitWidth(that.BitWidth) { in APInt() function 161 APInt(APInt &&that) : BitWidth(that.BitWidth) { in APInt() function [all …]
|
| H A D | APSInt.h | 23 class [[nodiscard]] APSInt : public APInt { 32 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {} 34 explicit APSInt(APInt I, bool isUnsigned = true) 35 : APInt(std::move(I)), IsUnsigned(isUnsigned) {} in APInt() function 49 bool isNegative() const { return isSigned() && APInt::isNegative(); } in isNegative() 64 APSInt &operator=(APInt RHS) { 66 APInt::operator=(std::move(RHS)); 72 APInt::operator=(RHS); 84 APInt::toString(Str, Radix, isSigned()); 86 using APInt::toString; [all …]
|
| H A D | APFloat.h | 143 typedef APInt::WordType integerPart; 144 static constexpr unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD; 265 IEEEFloat(const fltSemantics &, const APInt &); 313 opStatus convertFromAPInt(const APInt &, bool, roundingMode); 319 APInt bitcastToAPInt() const; 478 const APInt *fill = nullptr); 564 APInt convertHalfAPFloatToAPInt() const; 565 APInt convertBFloatAPFloatToAPInt() const; 566 APInt convertFloatAPFloatToAPInt() const; 567 APInt convertDoubleAPFloatToAPInt() const; [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Support/ |
| H A D | APInt.cpp | 75 void APInt::initSlowCase(uint64_t val, bool isSigned) { in initSlowCase() 84 void APInt::initSlowCase(const APInt& that) { in initSlowCase() 89 void APInt::initFromArray(ArrayRef<uint64_t> bigVal) { in initFromArray() 105 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) : BitWidth(numBits) { in APInt() function in APInt 109 APInt::APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]) in APInt() function in APInt 114 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() function in APInt 119 void APInt::reallocate(unsigned NewBitWidth) { in reallocate() 138 void APInt::assignSlowCase(const APInt &RHS) { in assignSlowCase() 154 void APInt::Profile(FoldingSetNodeID& ID) const { in Profile() 168 APInt& APInt::operator++() { in operator ++() [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 | APFloat.cpp | 527 lsb = APInt::tcLSB(parts, partCount); in lostFractionThroughTruncation() 535 APInt::tcExtractBit(parts, bits - 1)) in lostFractionThroughTruncation() 549 APInt::tcShiftRight(dst, parts, bits); in shiftRight() 663 APInt::tcFullMultiply(pow5, pow5 - pc, pow5 - pc, pc, pc); in powerOf5() 673 APInt::tcFullMultiply(p2, p1, pow5, result, pc); in powerOf5() 689 APInt::tcAssign(dst, p1, result); in powerOf5() 784 APInt::tcAssign(significandParts(), rhs.significandParts(), in copySignificand() 791 void IEEEFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) { in makeNaN() 799 APInt fill_storage; in makeNaN() 804 fill_storage = APInt::getAllOnes(semantics->precision - 1); in makeNaN() [all …]
|
| H A D | KnownBits.cpp | 27 APInt PossibleSumZero = LHS.getMaxValue() + RHS.getMaxValue() + !CarryZero; in computeForAddCarry() 28 APInt PossibleSumOne = LHS.getMinValue() + RHS.getMinValue() + CarryOne; in computeForAddCarry() 31 APInt CarryKnownZero = ~(PossibleSumZero ^ LHS.Zero ^ RHS.Zero); in computeForAddCarry() 32 APInt CarryKnownOne = PossibleSumOne ^ LHS.One ^ RHS.One; in computeForAddCarry() 35 APInt LHSKnownUnion = LHS.Zero | LHS.One; in computeForAddCarry() 36 APInt RHSKnownUnion = RHS.Zero | RHS.One; in computeForAddCarry() 37 APInt CarryKnownUnion = std::move(CarryKnownZero) | CarryKnownOne; in computeForAddCarry() 38 APInt Known = std::move(LHSKnownUnion) & RHSKnownUnion & CarryKnownUnion; in computeForAddCarry() 105 KnownBits KnownBits::makeGE(const APInt &Val) const { in makeGE() 112 APInt MaskedVal(Val); in makeGE() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/IR/ |
| H A D | ConstantRange.cpp | 45 : Lower(Full ? APInt::getMaxValue(BitWidth) : APInt::getMinValue(BitWidth)), in ConstantRange() 48 ConstantRange::ConstantRange(APInt V) in ConstantRange() 51 ConstantRange::ConstantRange(APInt L, APInt U) in ConstantRange() 73 APInt Lower = Known.getMinValue(), Upper = Known.getMaxValue(); in fromKnownBits() 86 APInt Min = getUnsignedMin(); in toKnownBits() 87 APInt Max = getUnsignedMax(); in toKnownBits() 113 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion() 116 return ConstantRange(APInt::getMinValue(W), std::move(UMax)); in makeAllowedICmpRegion() 119 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion() 122 return ConstantRange(APInt::getSignedMinValue(W), std::move(SMax)); in makeAllowedICmpRegion() [all …]
|
| H A D | Operator.cpp | 92 const DataLayout &DL, APInt &Offset, in accumulateConstantOffset() 93 function_ref<bool(Value &, APInt &)> ExternalAnalysis) const { in accumulateConstantOffset() 104 APInt &Offset, function_ref<bool(Value &, APInt &)> ExternalAnalysis) { in accumulateConstantOffset() 106 auto AccumulateOffset = [&](APInt Index, uint64_t Size) -> bool { in accumulateConstantOffset() 108 APInt IndexedSize = APInt(Offset.getBitWidth(), Size); in accumulateConstantOffset() 116 APInt OffsetPlus = Index.smul_ov(IndexedSize, Overflow); in accumulateConstantOffset() 150 APInt(Offset.getBitWidth(), SL->getElementOffset(ElementIdx)), in accumulateConstantOffset() 165 APInt AnalysisIndex; in accumulateConstantOffset() 178 MapVector<Value *, APInt> &VariableOffsets, in collectOffset() 179 APInt &ConstantOffset) const { in collectOffset() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Analysis/ |
| H A D | DemandedBits.cpp | 82 const APInt &AOut, APInt &AB, KnownBits &Known, KnownBits &Known2, in determineLiveOperandBits() 131 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits() 141 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits() 147 const APInt *SA; in determineLiveOperandBits() 173 AB = APInt::getBitsSetFrom(BitWidth, AOut.countTrailingZeros()); in determineLiveOperandBits() 198 AB = APInt::getLowBitsSet(BitWidth, AOut.getActiveBits()); in determineLiveOperandBits() 202 const APInt *ShiftAmtC; in determineLiveOperandBits() 211 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt+1); in determineLiveOperandBits() 213 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt); in determineLiveOperandBits() 219 const APInt *ShiftAmtC; in determineLiveOperandBits() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/IR/ |
| H A D | ConstantRange.h | 48 APInt Lower, Upper; 65 ConstantRange(APInt Value); 70 ConstantRange(APInt Lower, APInt Upper); 84 static ConstantRange getNonEmpty(APInt Lower, APInt Upper) { in getNonEmpty() 125 const APInt &Other); 176 const APInt &Other, 190 bool getEquivalentICmp(CmpInst::Predicate &Pred, APInt &RHS) const; 195 getEquivalentICmp(CmpInst::Predicate &Pred, APInt &RHS, APInt &Offset) const; 198 const APInt &getLower() const { return Lower; } in getLower() 201 const APInt &getUpper() const { return Upper; } in getUpper() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSimplifyDemanded.cpp | 31 const APInt &Demanded) { in ShrinkDemandedConstant() 37 const APInt *C; in ShrinkDemandedConstant() 58 APInt DemandedMask(APInt::getAllOnes(BitWidth)); in SimplifyDemandedInstructionBits() 72 const APInt &DemandedMask, in SimplifyDemandedBits() 108 Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, in SimplifyDemandedUseBits() 170 auto simplifyOperandsBasedOnUnusedHighBits = [&](APInt &DemandedFromOps) { in SimplifyDemandedUseBits() 174 DemandedFromOps = APInt::getLowBitsSet(BitWidth, BitWidth - NLZ); in SimplifyDemandedUseBits() 304 const APInt *C; in SimplifyDemandedUseBits() 326 APInt NewMask = ~(LHSKnown.One & RHSKnown.One & DemandedMask); in SimplifyDemandedUseBits() 352 const APInt &DemandedMask) { in SimplifyDemandedUseBits() [all …]
|
| H A D | InstCombineInternal.h | 48 class APInt; variable 468 Value *SimplifyDemandedUseBits(Value *V, APInt DemandedMask, KnownBits &Known, 471 const APInt &DemandedMask, KnownBits &Known, 478 const APInt &DemandedMask, 485 Instruction *Shr, const APInt &ShrOp1, Instruction *Shl, 486 const APInt &ShlOp1, const APInt &DemandedMask, KnownBits &Known); 492 Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, 493 APInt &UndefElts, unsigned Depth = 0, 559 Instruction *foldICmpAddOpConst(Value *X, const APInt &C, 570 const APInt &C); [all …]
|
| H A D | InstCombineShifts.cpp | 42 APInt MaximalRepresentableShiftAmount = in canTryToConstantAddTwoShiftAmounts() 43 APInt::getAllOnes(ShAmt0->getType()->getScalarSizeInBits()); in canTryToConstantAddTwoShiftAmounts() 118 APInt(NewShAmtBitWidth, XBitWidth)))) in reassociateShiftAmtsOfTwoSameDirectionShifts() 130 APInt(NewShAmtBitWidth, XBitWidth - 1)))) in reassociateShiftAmtsOfTwoSameDirectionShifts() 348 APInt Threshold(Ty->getScalarSizeInBits(), Ty->getScalarSizeInBits()); in foldShiftOfShiftedLogic() 415 const APInt *AC, *AddC; in commonShiftTransforms() 480 const APInt *InnerShiftConst; in canEvaluateShiftedShift() 508 APInt Mask = APInt::getLowBitsSet(TypeWidth, OuterShAmt) << MaskShift; in canEvaluateShiftedShift() 570 const APInt *MulConst; in canEvaluateShifted() 589 const APInt *C1; in foldShiftedShift() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/AMDGPU/MCTargetDesc/ |
| H A D | AMDGPUMCCodeEmitter.h | 37 APInt &Inst, APInt &Scratch, 41 APInt &Op, SmallVectorImpl<MCFixup> &Fixups, 44 virtual void getSOPPBrEncoding(const MCInst &MI, unsigned OpNo, APInt &Op, 48 virtual void getSMEMOffsetEncoding(const MCInst &MI, unsigned OpNo, APInt &Op, 52 virtual void getSDWASrcEncoding(const MCInst &MI, unsigned OpNo, APInt &Op, 57 APInt &Op, 61 virtual void getAVOperandEncoding(const MCInst &MI, unsigned OpNo, APInt &Op,
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/Utils/ |
| H A D | LowerSwitch.cpp | 55 APInt Low, High; 120 const APInt &NumMergedCases) { in FixPhis() 126 APInt LocalNumMergedCases = NumMergedCases; in FixPhis() 211 APInt Range = Leaf.High->getValue() - Leaf.Low->getValue(); in NewLeafBlock() 212 for (APInt j(Range.getBitWidth(), 0, true); j.slt(Range); ++j) { in NewLeafBlock() 243 APInt NumMergedCases = UpperBound->getValue() - LowerBound->getValue(); in SwitchConvert() 274 APInt GapLow = LHS.back().High->getValue() + 1; in SwitchConvert() 275 APInt GapHigh = NewLowerBound->getValue() - 1; in SwitchConvert() 328 const APInt &nextValue = J->Low->getValue(); in Clusterify() 329 const APInt ¤tValue = I->High->getValue(); in Clusterify() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Analysis/ |
| H A D | DemandedBits.h | 54 APInt getDemandedBits(Instruction *I); 57 APInt getDemandedBits(Use *U); 69 static APInt determineLiveOperandBitsAdd(unsigned OperandNo, 70 const APInt &AOut, 76 static APInt determineLiveOperandBitsSub(unsigned OperandNo, 77 const APInt &AOut, 85 const APInt &AOut, APInt &AB, 96 DenseMap<Instruction *, APInt> AliveBits;
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/CodeGen/GlobalISel/ |
| H A D | GISelKnownBits.h | 39 const APInt &DemandedElts, 43 const APInt &DemandedElts, unsigned Depth = 0); 58 const APInt &DemandedElts, 61 unsigned computeNumSignBits(Register R, const APInt &DemandedElts, 67 KnownBits getKnownBits(Register R, const APInt &DemandedElts, 72 APInt getKnownZeroes(Register R); 73 APInt getKnownOnes(Register R); 78 bool maskedValueIsZero(Register Val, const APInt &Mask) { in maskedValueIsZero()
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/Hexagon/ |
| H A D | HexagonConstPropagation.cpp | 359 bool constToInt(const Constant *C, APInt &Val) const; 361 const ConstantInt *intToConst(const APInt &Val) const; 366 bool evaluateCMPri(uint32_t Cmp, const RegisterSubReg &R1, const APInt &A2, 370 bool evaluateCMPii(uint32_t Cmp, const APInt &A1, const APInt &A2, 372 bool evaluateCMPpi(uint32_t Cmp, uint32_t Props, const APInt &A2, 383 bool evaluateANDri(const RegisterSubReg &R1, const APInt &A2, 385 bool evaluateANDii(const APInt &A1, const APInt &A2, APInt &Result); 388 bool evaluateORri(const RegisterSubReg &R1, const APInt &A2, 390 bool evaluateORii(const APInt &A1, const APInt &A2, APInt &Result); 393 bool evaluateXORri(const RegisterSubReg &R1, const APInt &A2, [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Support/ |
| H A D | CheckedArithmetic.h | 31 llvm::APInt ALHS(sizeof(T) * 8, LHS, Signed); 32 llvm::APInt ARHS(sizeof(T) * 8, RHS, Signed); 34 llvm::APInt Out = (ALHS.*Op)(ARHS, Overflow); 49 return checkedOp(LHS, RHS, &llvm::APInt::sadd_ov); in checkedAdd() 58 return checkedOp(LHS, RHS, &llvm::APInt::ssub_ov); in checkedSub() 67 return checkedOp(LHS, RHS, &llvm::APInt::smul_ov); in checkedMul() 87 return checkedOp(LHS, RHS, &llvm::APInt::uadd_ov, /*Signed=*/false); in checkedAddUnsigned() 96 return checkedOp(LHS, RHS, &llvm::APInt::umul_ov, /*Signed=*/false); in checkedMulUnsigned()
|
| H A D | KnownBits.h | 24 APInt Zero; 25 APInt One; 29 KnownBits(APInt Zero, APInt One) in KnownBits() 57 const APInt &getConstant() const { in getConstant() 120 APInt getMinValue() const { in getMinValue() 126 APInt getSignedMinValue() const { in getSignedMinValue() 128 APInt Min = One; in getSignedMinValue() 136 APInt getMaxValue() const { in getMaxValue() 142 APInt getSignedMaxValue() const { in getSignedMaxValue() 144 APInt Max = ~Zero; in getSignedMaxValue() [all …]
|
| /openbsd-src/gnu/llvm/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, 114 unsigned InsertPos, APInt &Value, in encodeRelocImm() 141 unsigned InsertPos, APInt &Value, in encodePCRelImm() 176 unsigned InsertPos, APInt &Value, in getMachineOpValue() 211 APInt EncodedInst(16, 0U); in encodeInstruction() 212 APInt Scratch(16, 0U); in encodeInstruction()
|
| /openbsd-src/gnu/llvm/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()
|
| /openbsd-src/gnu/llvm/llvm/lib/DebugInfo/CodeView/ |
| H A D | RecordSerialization.cpp | 44 Num = APSInt(APInt(/*numBits=*/16, Short, /*isSigned=*/false), in consume() 54 Num = APSInt(APInt(8, N, true), false); in consume() 61 Num = APSInt(APInt(16, N, true), false); in consume() 68 Num = APSInt(APInt(16, N, false), true); in consume() 75 Num = APSInt(APInt(32, N, true), false); in consume() 82 Num = APSInt(APInt(32, N, FalseVal), true); in consume() 89 Num = APSInt(APInt(64, N, true), false); in consume() 96 Num = APSInt(APInt(64, N, false), true); in consume()
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/X86/MCTargetDesc/ |
| H A D | X86ShuffleDecode.h | 24 class APInt; variable 100 void DecodePSHUFBMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts, 124 void DecodeVPPERMMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts, 149 ArrayRef<uint64_t> RawMask, const APInt &UndefElts, 154 ArrayRef<uint64_t> RawMask, const APInt &UndefElts, 158 void DecodeVPERMVMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts, 162 void DecodeVPERMV3Mask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
|