| /openbsd-src/gnu/llvm/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 109 : BitWidth(numBits) { in BitWidth() function 153 APInt(const APInt &that) : BitWidth(that.BitWidth) { in APInt() 161 APInt(APInt &&that) : BitWidth(that.BitWidth) { in APInt() 163 that.BitWidth = 0; in APInt() 209 static APInt getSignMask(unsigned BitWidth) { in getSignMask() argument 210 return getSignedMinValue(BitWidth); in getSignMask() 305 bool isSingleWord() const { return BitWidth <= APINT_BITS_PER_WORD; } in isSingleWord() 312 bool isNegative() const { return (*this)[BitWidth - 1]; } in isNegative() 324 bool isSignBitSet() const { return (*this)[BitWidth - 1]; } in isSignBitSet() 355 if (BitWidth == 0) in isAllOnes() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Support/ |
| H A D | KnownBits.h | 37 KnownBits(unsigned BitWidth) : Zero(BitWidth, 0), One(BitWidth, 0) {} in KnownBits() 152 KnownBits trunc(unsigned BitWidth) const { in trunc() 153 return KnownBits(Zero.trunc(BitWidth), One.trunc(BitWidth)); in trunc() 158 KnownBits anyext(unsigned BitWidth) const { in anyext() 159 return KnownBits(Zero.zext(BitWidth), One.zext(BitWidth)); in anyext() 163 KnownBits zext(unsigned BitWidth) const { in zext() 165 APInt NewZero = Zero.zext(BitWidth); in zext() 167 return KnownBits(NewZero, One.zext(BitWidth)); in zext() 171 KnownBits sext(unsigned BitWidth) const { in sext() 172 return KnownBits(Zero.sext(BitWidth), One.sext(BitWidth)); in sext() [all …]
|
| /openbsd-src/gnu/llvm/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | APSIntType.h | 20 uint32_t BitWidth; variable 25 : BitWidth(Width), IsUnsigned(Unsigned) {} in APSIntType() 28 : BitWidth(Value.getBitWidth()), IsUnsigned(Value.isUnsigned()) {} in APSIntType() 30 uint32_t getBitWidth() const { return BitWidth; } in getBitWidth() 40 Value = Value.extOrTrunc(BitWidth); in apply() 56 return llvm::APSInt(BitWidth, IsUnsigned); in getZeroValue() 61 return llvm::APSInt::getMinValue(BitWidth, IsUnsigned); in getMinValue() 66 return llvm::APSInt::getMaxValue(BitWidth, IsUnsigned); in getMaxValue() 70 return (llvm::APSInt(BitWidth, IsUnsigned) = RawValue); in getValue() 92 return BitWidth == Other.BitWidth && IsUnsigned == Other.IsUnsigned; [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Support/ |
| H A D | APInt.cpp | 105 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) : BitWidth(numBits) { in APInt() 110 : BitWidth(numBits) { in APInt() 115 : BitWidth(numbits) { in APInt() 122 BitWidth = NewBitWidth; in reallocate() 131 BitWidth = NewBitWidth; in reallocate() 155 ID.AddInteger(BitWidth); in Profile() 189 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator +=() 209 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator -=() 226 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator *() 228 return APInt(BitWidth, U.VAL * RHS.U.VAL); in operator *() [all …]
|
| H A D | KnownBits.cpp | 89 unsigned BitWidth = getBitWidth(); in sextInReg() local 90 assert(0 < SrcBitWidth && SrcBitWidth <= BitWidth && in sextInReg() 93 if (SrcBitWidth == BitWidth) in sextInReg() 96 unsigned ExtBits = BitWidth - SrcBitWidth; in sextInReg() 168 unsigned BitWidth = LHS.getBitWidth(); in shl() local 169 KnownBits Known(BitWidth); in shl() 172 if (RHS.isConstant() && RHS.getConstant().ult(BitWidth)) { in shl() 187 if (MinShiftAmount.ult(BitWidth)) { in shl() 189 MinTrailingZeros = std::min(MinTrailingZeros, BitWidth); in shl() 195 if (MaxShiftAmount.ult(BitWidth) && !LHS.isUnknown()) { in shl() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Analysis/ |
| H A D | DemandedBits.cpp | 84 unsigned BitWidth = AB.getBitWidth(); in determineLiveOperandBits() local 93 [&](unsigned BitWidth, const Value *V1, const Value *V2) { in determineLiveOperandBits() argument 99 Known = KnownBits(BitWidth); in determineLiveOperandBits() 103 Known2 = KnownBits(BitWidth); in determineLiveOperandBits() 130 ComputeKnownBits(BitWidth, Val, nullptr); in determineLiveOperandBits() 131 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits() 132 std::min(BitWidth, Known.countMaxLeadingZeros()+1)); in determineLiveOperandBits() 140 ComputeKnownBits(BitWidth, Val, nullptr); in determineLiveOperandBits() 141 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits() 142 std::min(BitWidth, Known.countMaxTrailingZeros()+1)); in determineLiveOperandBits() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/CodeGen/ |
| H A D | ExpandLargeFpConvert.cpp | 95 unsigned BitWidth = FPToI->getType()->getIntegerBitWidth(); in expandFPToI() local 122 Builder.getIntN(BitWidth, 1), Builder.getIntN(BitWidth, FPMantissaWidth)); in expandFPToI() 124 Builder.CreateSub(ImplicitBit, Builder.getIntN(BitWidth, 1)); in expandFPToI() 129 ConstantInt::getSigned(IntTy, BitWidth - 1)); in expandFPToI() 165 Builder.CreateLShr(ARep, Builder.getIntN(BitWidth, FPMantissaWidth)); in expandFPToI() 167 And, Builder.getIntN(BitWidth, (1 << ExponentWidth) - 1)); in expandFPToI() 171 Builder.CreateICmpULT(And2, Builder.getIntN(BitWidth, ExponentBias)); in expandFPToI() 177 And2, ConstantInt::getSigned(IntTy, -int64_t(ExponentBias + BitWidth))); in expandFPToI() 179 Builder.CreateICmpULT(Add1, ConstantInt::getSigned(IntTy, -BitWidth)); in expandFPToI() 191 And2, Builder.getIntN(BitWidth, ExponentBias + FPMantissaWidth)); in expandFPToI() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/AMDGPU/ |
| H A D | SIRegisterInfo.cpp | 2519 getAnyVGPRClassForBitWidth(unsigned BitWidth) { in getAnyVGPRClassForBitWidth() argument 2520 if (BitWidth <= 64) in getAnyVGPRClassForBitWidth() 2522 if (BitWidth <= 96) in getAnyVGPRClassForBitWidth() 2524 if (BitWidth <= 128) in getAnyVGPRClassForBitWidth() 2526 if (BitWidth <= 160) in getAnyVGPRClassForBitWidth() 2528 if (BitWidth <= 192) in getAnyVGPRClassForBitWidth() 2530 if (BitWidth <= 224) in getAnyVGPRClassForBitWidth() 2532 if (BitWidth <= 256) in getAnyVGPRClassForBitWidth() 2534 if (BitWidth <= 288) in getAnyVGPRClassForBitWidth() 2536 if (BitWidth <= 320) in getAnyVGPRClassForBitWidth() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSimplifyDemanded.cpp | 56 unsigned BitWidth = Inst.getType()->getScalarSizeInBits(); in SimplifyDemandedInstructionBits() local 57 KnownBits Known(BitWidth); in SimplifyDemandedInstructionBits() 58 APInt DemandedMask(APInt::getAllOnes(BitWidth)); in SimplifyDemandedInstructionBits() 114 uint32_t BitWidth = DemandedMask.getBitWidth(); in SimplifyDemandedUseBits() local 117 (!VTy->isIntOrIntVectorTy() || VTy->getScalarSizeInBits() == BitWidth) && in SimplifyDemandedUseBits() 118 Known.getBitWidth() == BitWidth && in SimplifyDemandedUseBits() 145 KnownBits LHSKnown(BitWidth), RHSKnown(BitWidth); in SimplifyDemandedUseBits() 174 DemandedFromOps = APInt::getLowBitsSet(BitWidth, BitWidth - NLZ); in SimplifyDemandedUseBits() 414 Known = InputKnown.zextOrTrunc(BitWidth); in SimplifyDemandedUseBits() 467 Known = InputKnown.sext(BitWidth); in SimplifyDemandedUseBits() [all …]
|
| H A D | InstCombineShifts.cpp | 413 unsigned BitWidth = Ty->getScalarSizeInBits(); in commonShiftTransforms() local 422 AddC->isNegative() && (-*AddC).ult(BitWidth)) { in commonShiftTransforms() 928 unsigned BitWidth = Ty->getScalarSizeInBits(); in visitShl() local 946 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl() 952 C1->ult(BitWidth)) { in visitShl() 973 C1->ult(BitWidth)) { in visitShl() 982 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl() 993 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl() 1014 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl() 1018 if (match(Op0, m_Shl(m_Value(X), m_APInt(C1))) && C1->ult(BitWidth)) { in visitShl() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/CodeGen/GlobalISel/ |
| H A D | GISelKnownBits.cpp | 81 unsigned BitWidth = Ty.getScalarSizeInBits(); in signBitIsZero() local 82 return maskedValueIsZero(R, APInt::getSignMask(BitWidth)); in signBitIsZero() 124 static KnownBits extractBits(unsigned BitWidth, const KnownBits &SrcOpKnown, in extractBits() argument 127 KnownBits Mask(BitWidth); in extractBits() 129 BitWidth, WidthKnown.getMaxValue().getLimitedValue(BitWidth)); in extractBits() 131 BitWidth, WidthKnown.getMinValue().getLimitedValue(BitWidth)); in extractBits() 151 unsigned BitWidth = DstTy.getScalarSizeInBits(); in computeKnownBitsImpl() local 157 assert(Known.getBitWidth() == BitWidth && "Cache entry size doesn't match"); in computeKnownBitsImpl() 160 Known = KnownBits(BitWidth); // Don't know anything in computeKnownBitsImpl() 205 Known.One = APInt::getAllOnes(BitWidth); in computeKnownBitsImpl() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/IR/ |
| H A D | ConstantRange.h | 62 explicit ConstantRange(uint32_t BitWidth, bool isFullSet); 73 static ConstantRange getEmpty(uint32_t BitWidth) { in getEmpty() argument 74 return ConstantRange(BitWidth, false); in getEmpty() 78 static ConstantRange getFull(uint32_t BitWidth) { in getFull() argument 79 return ConstantRange(BitWidth, true); in getFull() 351 uint32_t BitWidth) const; 357 ConstantRange zeroExtend(uint32_t BitWidth) const; 363 ConstantRange signExtend(uint32_t BitWidth) const; 369 ConstantRange truncate(uint32_t BitWidth) const; 373 ConstantRange zextOrTrunc(uint32_t BitWidth) const; [all …]
|
| /openbsd-src/gnu/llvm/clang/lib/CodeGen/ |
| H A D | PatternInit.cpp | 37 unsigned BitWidth = in initializationPatternFor() local 39 if (BitWidth <= 64) in initializationPatternFor() 42 Ty, llvm::APInt::getSplat(BitWidth, llvm::APInt(64, IntValue))); in initializationPatternFor() 55 unsigned BitWidth = llvm::APFloat::semanticsSizeInBits( in initializationPatternFor() local 58 if (BitWidth >= 64) in initializationPatternFor() 59 Payload = llvm::APInt::getSplat(BitWidth, Payload); in initializationPatternFor()
|
| /openbsd-src/gnu/llvm/clang/lib/Basic/Targets/ |
| H A D | AVR.h | 157 IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getIntTypeByWidth() argument 159 return BitWidth == 16 ? (IsSigned ? SignedInt : UnsignedInt) in getIntTypeByWidth() 160 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned); in getIntTypeByWidth() 163 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getLeastIntTypeByWidth() argument 165 return BitWidth == 16 in getLeastIntTypeByWidth() 167 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned); in getLeastIntTypeByWidth()
|
| H A D | WebAssembly.h | 115 IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getIntTypeByWidth() argument 117 return BitWidth == 64 ? (IsSigned ? SignedLongLong : UnsignedLongLong) in getIntTypeByWidth() 118 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned); in getIntTypeByWidth() 121 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getLeastIntTypeByWidth() argument 123 return BitWidth == 64 in getLeastIntTypeByWidth() 125 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned); in getLeastIntTypeByWidth()
|
| /openbsd-src/gnu/llvm/llvm/lib/InterfaceStub/ |
| H A D | IFSHandler.cpp | 108 IO.mapOptional("BitWidth", Target.BitWidth); in mapping() 213 !CopyStub->Target.BitWidth)) in writeIFSToOutputStream() 242 if (Stub.Target.BitWidth && *Stub.Target.BitWidth != *OverrideBitWidth) { in overrideIFSTarget() 246 Stub.Target.BitWidth = *OverrideBitWidth; in overrideIFSTarget() 261 if (Stub.Target.Arch || Stub.Target.BitWidth || Stub.Target.Endianness || in validateIFSTarget() 270 Stub.Target.BitWidth = TargetFromTriple.BitWidth; in validateIFSTarget() 275 if (!Stub.Target.Arch || !Stub.Target.BitWidth || !Stub.Target.Endianness) { in validateIFSTarget() 281 if (!Stub.Target.BitWidth) { in validateIFSTarget() 309 RetTarget.BitWidth = in parseTriple() 324 Stub.Target.BitWidth.reset(); in stripIFSTarget() [all …]
|
| H A D | IFSStub.cpp | 58 !BitWidth; in empty() 61 uint8_t ifs::convertIFSBitWidthToELF(IFSBitWidthType BitWidth) { in convertIFSBitWidthToELF() argument 62 switch (BitWidth) { in convertIFSBitWidthToELF() 97 IFSBitWidthType ifs::convertELFBitWidthToIFS(uint8_t BitWidth) { in convertELFBitWidthToIFS() argument 98 switch (BitWidth) { in convertELFBitWidthToIFS()
|
| /openbsd-src/gnu/llvm/clang/lib/Basic/ |
| H A D | TargetInfo.cpp | 284 unsigned BitWidth, bool IsSigned) const { in getIntTypeByWidth() argument 285 if (getCharWidth() == BitWidth) in getIntTypeByWidth() 287 if (getShortWidth() == BitWidth) in getIntTypeByWidth() 289 if (getIntWidth() == BitWidth) in getIntTypeByWidth() 291 if (getLongWidth() == BitWidth) in getIntTypeByWidth() 293 if (getLongLongWidth() == BitWidth) in getIntTypeByWidth() 298 TargetInfo::IntType TargetInfo::getLeastIntTypeByWidth(unsigned BitWidth, in getLeastIntTypeByWidth() argument 300 if (getCharWidth() >= BitWidth) in getLeastIntTypeByWidth() 302 if (getShortWidth() >= BitWidth) in getLeastIntTypeByWidth() 304 if (getIntWidth() >= BitWidth) in getLeastIntTypeByWidth() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/InterfaceStub/ |
| H A D | IFSStub.h | 70 std::optional<IFSBitWidthType> BitWidth; member 76 if (Lhs.Arch != Rhs.Arch || Lhs.BitWidth != Rhs.BitWidth || 118 uint8_t convertIFSBitWidthToELF(IFSBitWidthType BitWidth); 137 IFSBitWidthType convertELFBitWidthToIFS(uint8_t BitWidth);
|
| /openbsd-src/gnu/llvm/llvm/utils/TableGen/ |
| H A D | CodeEmitterGen.cpp | 60 unsigned BitWidth; member in __anon5c4fcf010111::CodeEmitterGen 395 o << " "; emitInstBits(o, APInt(BitWidth, 0)); o << ",\n"; in emitInstructionBaseValues() 410 APInt Value(BitWidth, 0); in emitInstructionBaseValues() 441 BitWidth = 0; in run() 453 BitWidth = std::max(BitWidth, BI->getNumBits()); in run() 460 BitWidth = std::max(BitWidth, BI->getNumBits()); in run() 462 UseAPInt = BitWidth > 64; in run() 516 int NumWords = APInt::getNumWords(BitWidth); in run() 518 << " if (Scratch.getBitWidth() != " << BitWidth << ")\n" in run() 519 << " Scratch = Scratch.zext(" << BitWidth << ");\n" in run() [all …]
|
| H A D | VarLenCodeEmitterGen.cpp | 119 NumBits += S.BitWidth; in VarLenInst() 384 unsigned i = 0U, BitWidth = VLI.size(); in emitInstructionBaseValues() local 387 APInt Value(BitWidth, 0); in emitInstructionBaseValues() 390 while (i < BitWidth && SI != SE) { in emitInstructionBaseValues() 391 unsigned SegmentNumBits = SI->BitWidth; in emitInstructionBaseValues() 444 size_t BitWidth = VLI.size(); in getInstructionCaseForEncoding() local 451 if (BitWidth && !VLI.isFixedValueOnly()) in getInstructionCaseForEncoding() 452 SS.indent(6) << "Scratch = Scratch.zext(" << BitWidth << ");\n"; in getInstructionCaseForEncoding() 459 unsigned NumBits = ES.BitWidth; in getInstructionCaseForEncoding()
|
| /openbsd-src/gnu/llvm/llvm/lib/CodeGen/SelectionDAG/ |
| H A D | FunctionLoweringInfo.cpp | 407 FunctionLoweringInfo::GetLiveOutRegInfo(Register Reg, unsigned BitWidth) { in GetLiveOutRegInfo() argument 415 if (BitWidth > LOI->Known.getBitWidth()) { in GetLiveOutRegInfo() 417 LOI->Known = LOI->Known.anyext(BitWidth); in GetLiveOutRegInfo() 439 unsigned BitWidth = IntVT.getSizeInBits(); in ComputePHILiveOutRegInfo() local 455 DestLOI.Known = KnownBits(BitWidth); in ComputePHILiveOutRegInfo() 462 Val = CI->getValue().sext(BitWidth); in ComputePHILiveOutRegInfo() 464 Val = CI->getValue().zext(BitWidth); in ComputePHILiveOutRegInfo() 475 const LiveOutInfo *SrcLOI = GetLiveOutRegInfo(SrcReg, BitWidth); in ComputePHILiveOutRegInfo() 483 assert(DestLOI.Known.Zero.getBitWidth() == BitWidth && in ComputePHILiveOutRegInfo() 484 DestLOI.Known.One.getBitWidth() == BitWidth && in ComputePHILiveOutRegInfo() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/IR/ |
| H A D | Operator.cpp | 177 const DataLayout &DL, unsigned BitWidth, in collectOffset() argument 180 assert(BitWidth == DL.getIndexSizeInBits(getPointerAddressSpace()) && in collectOffset() 184 Index = Index.sextOrTrunc(BitWidth); in collectOffset() 185 APInt IndexedSize = APInt(BitWidth, Size); in collectOffset() 212 CollectConstantOffset(APInt(BitWidth, SL->getElementOffset(ElementIdx)), in collectOffset() 224 APInt(BitWidth, DL.getTypeAllocSize(GTI.getIndexedType())); in collectOffset() 228 VariableOffsets.insert({V, APInt(BitWidth, 0)}); in collectOffset()
|
| H A D | DataLayout.cpp | 560 uint32_t BitWidth) { in findAlignmentLowerBound() argument 561 auto Pair = std::make_pair((unsigned)AlignType, BitWidth); in findAlignmentLowerBound() 634 Align DataLayout::getIntegerAlignment(uint32_t BitWidth, in getIntegerAlignment() argument 636 auto I = findAlignmentLowerBound(INTEGER_ALIGN, BitWidth); in getIntegerAlignment() 789 unsigned BitWidth = getTypeSizeInBits(Ty).getFixedValue(); in getAlignment() local 790 auto I = findAlignmentLowerBound(FLOAT_ALIGN, BitWidth); in getAlignment() 792 I->TypeBitWidth == BitWidth) in getAlignment() 801 return Align(PowerOf2Ceil(BitWidth / 8)); in getAlignment() 806 unsigned BitWidth = getTypeSizeInBits(Ty).getKnownMinValue(); in getAlignment() local 807 auto I = findAlignmentLowerBound(VECTOR_ALIGN, BitWidth); in getAlignment() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/CodeGen/ |
| H A D | ValueTypes.h | 58 static EVT getFloatingPointVT(unsigned BitWidth) { in getFloatingPointVT() 59 return MVT::getFloatingPointVT(BitWidth); in getFloatingPointVT() 64 static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth) { in getIntegerVT() 65 MVT M = MVT::getIntegerVT(BitWidth); in getIntegerVT() 68 return getExtendedIntegerVT(Context, BitWidth); in getIntegerVT() 388 unsigned BitWidth = getSizeInBits(); in getRoundIntegerType() local 389 if (BitWidth <= 8) in getRoundIntegerType() 391 return getIntegerVT(Context, llvm::bit_ceil(BitWidth)); in getRoundIntegerType() 494 static EVT getExtendedIntegerVT(LLVMContext &C, unsigned BitWidth);
|