| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | KnownBits.cpp | 63 unsigned BitWidth = LHS.getBitWidth(); in computeForAddSub() local 64 KnownBits KnownOut(BitWidth); in computeForAddSub() 92 unsigned NumBits = MinVal.trunc(BitWidth - 1).countl_one(); in computeForAddSub() 95 KnownOut.One.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() 106 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub() 107 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() 128 unsigned NumBits = MinVal.trunc(BitWidth - 1).countl_one(); in computeForAddSub() 129 KnownOut.One.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() 134 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub() 135 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() [all …]
|
| H A D | APInt.cpp | 107 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) : BitWidth(numBits) { in APInt() 112 : BitWidth(numBits) { in APInt() 117 : BitWidth(numbits) { in APInt() 124 BitWidth = NewBitWidth; in reallocate() 133 BitWidth = NewBitWidth; in reallocate() 157 ID.AddInteger(BitWidth); in Profile() 199 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator +=() 219 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator -=() 236 assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); in operator *() 238 return APInt(BitWidth, U.VAL * RHS.U.VAL, /*isSigned=*/false, in operator *() [all …]
|
| /freebsd/contrib/llvm-project/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 …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | DemandedBits.cpp | 56 unsigned BitWidth = AB.getBitWidth(); in determineLiveOperandBits() local 65 [&](unsigned BitWidth, const Value *V1, const Value *V2) { in determineLiveOperandBits() argument 71 Known = KnownBits(BitWidth); in determineLiveOperandBits() 75 Known2 = KnownBits(BitWidth); in determineLiveOperandBits() 102 ComputeKnownBits(BitWidth, Val, nullptr); in determineLiveOperandBits() 103 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits() 104 std::min(BitWidth, Known.countMaxLeadingZeros()+1)); in determineLiveOperandBits() 112 ComputeKnownBits(BitWidth, Val, nullptr); in determineLiveOperandBits() 113 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits() 114 std::min(BitWidth, Known.countMaxTrailingZeros()+1)); in determineLiveOperandBits() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 113 : BitWidth(numBits) { in BitWidth() function 116 if (BitWidth == 0) { in BitWidth() 120 assert(llvm::isIntN(BitWidth, val) && in BitWidth() 124 if (BitWidth == 0) { in BitWidth() 127 assert(llvm::isUIntN(BitWidth, val) && in BitWidth() 176 APInt(const APInt &that) : BitWidth(that.BitWidth) { in APInt() 184 APInt(APInt &&that) : BitWidth(that.BitWidth) { in APInt() 186 that.BitWidth = 0; in APInt() 229 static APInt getSignMask(unsigned BitWidth) { in getSignMask() argument 230 return getSignedMinValue(BitWidth); in getSignMask() [all …]
|
| /freebsd/sys/contrib/dev/acpica/components/executer/ |
| H A D | exregion.c | 183 UINT32 BitWidth, in AcpiExSystemMemorySpaceHandler() argument 204 switch (BitWidth) in AcpiExSystemMemorySpaceHandler() 229 BitWidth)); in AcpiExSystemMemorySpaceHandler() 342 BitWidth, Function, ACPI_FORMAT_UINT64 (Address))); in AcpiExSystemMemorySpaceHandler() 357 switch (BitWidth) in AcpiExSystemMemorySpaceHandler() 389 switch (BitWidth) in AcpiExSystemMemorySpaceHandler() 451 UINT32 BitWidth, in AcpiExSystemIoSpaceHandler() argument 465 BitWidth, Function, ACPI_FORMAT_UINT64 (Address))); in AcpiExSystemIoSpaceHandler() 474 &Value32, BitWidth); in AcpiExSystemIoSpaceHandler() 481 (UINT32) *Value, BitWidth); in AcpiExSystemIoSpaceHandler() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/ |
| H A D | IntegralAP.h | 42 uint32_t BitWidth = 0; variable 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() 79 assert(BitWidth == V.getBitWidth()); in copy() 95 IntegralAP(unsigned BitWidth) : Val(0), BitWidth(BitWidth) { in IntegralAP() argument 98 IntegralAP(uint64_t *Memory, unsigned BitWidth) in IntegralAP() argument 99 : Memory(Memory), BitWidth(BitWidth) {} in IntegralAP() 100 IntegralAP(const APInt &V) : BitWidth(V.getBitWidth()) { in IntegralAP() 139 constexpr uint32_t bitWidth() const { return BitWidth; } in bitWidth() [all …]
|
| H A D | InterpBuiltinBitCast.cpp | 272 Bits BitWidth = FullBitWidth; in readPointerToBuffer() local 275 BitWidth = Bits(std::min(FD->getBitWidthValue(), in readPointerToBuffer() 278 BitWidth = Bits(1); in readPointerToBuffer() 280 if (BitWidth.isZero()) in readPointerToBuffer() 318 Buffer.markInitialized(BitOffset, BitWidth); in readPointerToBuffer() 321 Buffer.pushData(Buff.get(), BitOffset, BitWidth, TargetEndianness); in readPointerToBuffer() 327 std::byte *Buff, Bits BitWidth, Bits FullBitWidth, in DoBitCast() argument 332 assert(BitWidth <= FullBitWidth); in DoBitCast() 334 assert(BitWidth.isFullByte()); in DoBitCast() 344 HasIndeterminateBits = !Buffer.rangeInitialized(Bits::zero(), BitWidth); in DoBitCast() [all …]
|
| H A D | BitcastBuffer.cpp | 20 void BitcastBuffer::pushData(const std::byte *In, Bits BitOffset, Bits BitWidth, in pushData() argument 22 for (unsigned It = 0; It != BitWidth.getQuantity(); ++It) { in pushData() 31 DstBit = size() - BitOffset - BitWidth + Bits(It); in pushData() 39 BitcastBuffer::copyBits(Bits BitOffset, Bits BitWidth, Bits FullBitWidth, in copyBits() argument 41 assert(BitWidth.getQuantity() <= FullBitWidth.getQuantity()); in copyBits() 45 for (unsigned It = 0; It != BitWidth.getQuantity(); ++It) { in copyBits() 50 BitIndex = size() - BitWidth - BitOffset + Bits(It); in copyBits()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
| H A D | KnownBits.h | 41 KnownBits(unsigned BitWidth) : Zero(BitWidth, 0), One(BitWidth, 0) {} in KnownBits() 154 KnownBits trunc(unsigned BitWidth) const { in trunc() 155 return KnownBits(Zero.trunc(BitWidth), One.trunc(BitWidth)); in trunc() 160 KnownBits anyext(unsigned BitWidth) const { in anyext() 161 return KnownBits(Zero.zext(BitWidth), One.zext(BitWidth)); in anyext() 165 KnownBits zext(unsigned BitWidth) const { in zext() 167 APInt NewZero = Zero.zext(BitWidth); in zext() 169 return KnownBits(NewZero, One.zext(BitWidth)); in zext() 173 KnownBits sext(unsigned BitWidth) const { in sext() 174 return KnownBits(Zero.sext(BitWidth), One.sext(BitWidth)); in sext() [all …]
|
| /freebsd/sys/contrib/dev/acpica/components/hardware/ |
| H A D | hwregs.c | 223 if (!Reg->BitOffset && Reg->BitWidth && in AcpiHwGetAccessBitWidth() 224 ACPI_IS_POWER_OF_TWO (Reg->BitWidth) && in AcpiHwGetAccessBitWidth() 225 ACPI_IS_ALIGNED (Reg->BitWidth, 8)) in AcpiHwGetAccessBitWidth() 227 AccessBitWidth = Reg->BitWidth; in AcpiHwGetAccessBitWidth() 236 Reg->BitOffset + Reg->BitWidth); in AcpiHwGetAccessBitWidth() 292 UINT8 BitWidth; in AcpiHwValidateRegister() local 336 BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth); in AcpiHwValidateRegister() 337 if (MaxBitWidth < BitWidth) in AcpiHwValidateRegister() 341 MaxBitWidth, BitWidth)); in AcpiHwValidateRegister() 373 UINT32 BitWidth; in AcpiHwRead() local [all …]
|
| H A D | hwvalid.c | 163 UINT32 BitWidth); 240 UINT32 BitWidth) in AcpiHwValidateIoRequest() argument 253 if ((BitWidth != 8) && in AcpiHwValidateIoRequest() 254 (BitWidth != 16) && in AcpiHwValidateIoRequest() 255 (BitWidth != 32)) in AcpiHwValidateIoRequest() 258 "Bad BitWidth parameter: %8.8X", BitWidth)); in AcpiHwValidateIoRequest() 263 ByteWidth = ACPI_DIV_8 (BitWidth); in AcpiHwValidateIoRequest()
|
| /freebsd/contrib/llvm-project/llvm/lib/IR/ |
| H A D | DataLayout.cpp | 146 return BitWidth == Other.BitWidth && ABIAlign == Other.ABIAlign && in operator ==() 151 return AddrSpace == Other.AddrSpace && BitWidth == Other.BitWidth && in operator ==() 162 return LHS.BitWidth < RHSBitWidth; in operator ()() 287 static Error parseSize(StringRef Str, unsigned &BitWidth, in parseSize() argument 292 if (!to_integer(Str, BitWidth, 10) || BitWidth == 0 || !isUInt<24>(BitWidth)) in parseSize() 345 unsigned BitWidth; in parsePrimitiveSpec() local 346 if (Error Err = parseSize(Components[0], BitWidth)) in parsePrimitiveSpec() 354 if (Specifier == 'i' && BitWidth == 8 && ABIAlign != 1) in parsePrimitiveSpec() 367 setPrimitiveSpec(Specifier, BitWidth, ABIAlign, PrefAlign); in parsePrimitiveSpec() 384 unsigned BitWidth; in parseAggregateSpec() local [all …]
|
| H A D | ConstantRange.cpp | 45 ConstantRange::ConstantRange(uint32_t BitWidth, bool Full) in ConstantRange() argument 46 : Lower(Full ? APInt::getMaxValue(BitWidth) : APInt::getMinValue(BitWidth)), in ConstantRange() 289 unsigned BitWidth = V.getBitWidth(); in makeExactMulNUWRegion() local 294 APIntOps::RoundingUDiv(APInt::getMinValue(BitWidth), V, in makeExactMulNUWRegion() 296 APIntOps::RoundingUDiv(APInt::getMaxValue(BitWidth), V, in makeExactMulNUWRegion() 303 unsigned BitWidth = V.getBitWidth(); in makeExactMulNSWRegion() local 305 return ConstantRange::getFull(BitWidth); in makeExactMulNSWRegion() 307 APInt MinValue = APInt::getSignedMinValue(BitWidth); in makeExactMulNSWRegion() 308 APInt MaxValue = APInt::getSignedMaxValue(BitWidth); in makeExactMulNSWRegion() 337 unsigned BitWidth = Other.getBitWidth(); in makeGuaranteedNoWrapRegion() local [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | ExpandFp.cpp | 98 unsigned BitWidth = FPToI->getType()->getIntegerBitWidth(); in expandFPToI() local 126 Builder.getIntN(BitWidth, 1), Builder.getIntN(BitWidth, FPMantissaWidth)); in expandFPToI() 128 Builder.CreateSub(ImplicitBit, Builder.getIntN(BitWidth, 1)); in expandFPToI() 133 ConstantInt::getSigned(IntTy, BitWidth - 1)); in expandFPToI() 169 Builder.CreateLShr(ARep, Builder.getIntN(BitWidth, FPMantissaWidth)); in expandFPToI() 171 And, Builder.getIntN(BitWidth, (1 << ExponentWidth) - 1)); in expandFPToI() 175 Builder.CreateICmpULT(And2, Builder.getIntN(BitWidth, ExponentBias)); in expandFPToI() 182 IntTy, -static_cast<int64_t>(ExponentBias + BitWidth))); in expandFPToI() 184 Add1, ConstantInt::getSigned(IntTy, -static_cast<int64_t>(BitWidth))); in expandFPToI() 196 And2, Builder.getIntN(BitWidth, ExponentBias + FPMantissaWidth)); in expandFPToI() [all …]
|
| /freebsd/contrib/llvm-project/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()
|
| /freebsd/sys/contrib/dev/acpica/components/tables/ |
| H A D | tbfadt.c | 326 UINT8 BitWidth; in AcpiTbInitGenericAddress() local 333 BitWidth = (UINT8) (ByteWidth * 8); in AcpiTbInitGenericAddress() 349 BitWidth = 255; in AcpiTbInitGenericAddress() 361 GenericAddress->BitWidth = BitWidth; in AcpiTbInitGenericAddress() 741 (Address64->BitWidth != ACPI_MUL_8 (Length))) in AcpiTbConvertFadt() 745 Name, ACPI_MUL_8 (Length), Address64->BitWidth)); in AcpiTbConvertFadt() 843 (FadtInfoTable[i].DefaultLength != Target64->BitWidth)) in AcpiTbSetupFadtRegisters() 847 FadtInfoTable[i].Name, Target64->BitWidth, in AcpiTbSetupFadtRegisters() 852 Target64->BitWidth = FadtInfoTable[i].DefaultLength; in AcpiTbSetupFadtRegisters() 863 ACPI_DIV_16 (AcpiGbl_FADT.XPm1aEventBlock.BitWidth); in AcpiTbSetupFadtRegisters()
|
| /freebsd/contrib/llvm-project/llvm/utils/TableGen/ |
| H A D | CodeEmitterGen.cpp | 77 unsigned BitWidth = 0u; member in __anon7119260a0111::CodeEmitterGen 320 int NumWords = APInt::getNumWords(BitWidth); in getInstructionCases() 321 Case += " Inst = APInt(" + itostr(BitWidth); in getInstructionCases() 414 emitInstBits(O, APInt(BitWidth, 0)); in emitInstructionBaseValues() 428 APInt Value(BitWidth, 0); in emitInstructionBaseValues() 439 APInt Value(BitWidth, 0); in emitInstructionBaseValues() 486 BitWidth = 0; in run() 498 BitWidth = std::max(BitWidth, BI->getNumBits()); in run() 505 BitWidth = std::max(BitWidth, BI->getNumBits()); in run() 507 UseAPInt = BitWidth > 64; in run() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | SIRegisterInfo.cpp | 3336 getAnyVGPRClassForBitWidth(unsigned BitWidth) { in getAnyVGPRClassForBitWidth() argument 3337 if (BitWidth == 64) in getAnyVGPRClassForBitWidth() 3339 if (BitWidth == 96) in getAnyVGPRClassForBitWidth() 3341 if (BitWidth == 128) in getAnyVGPRClassForBitWidth() 3343 if (BitWidth == 160) in getAnyVGPRClassForBitWidth() 3345 if (BitWidth == 192) in getAnyVGPRClassForBitWidth() 3347 if (BitWidth == 224) in getAnyVGPRClassForBitWidth() 3349 if (BitWidth == 256) in getAnyVGPRClassForBitWidth() 3351 if (BitWidth == 288) in getAnyVGPRClassForBitWidth() 3353 if (BitWidth == 320) in getAnyVGPRClassForBitWidth() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineShifts.cpp | 456 unsigned BitWidth = Ty->getScalarSizeInBits(); in commonShiftTransforms() local 465 AddC->isNegative() && (-*AddC).ult(BitWidth)) { in commonShiftTransforms() 512 if (match(Op1, m_Or(m_Value(), m_SpecificInt(BitWidth - 1)))) in commonShiftTransforms() 513 return replaceOperand(I, 1, ConstantInt::get(Ty, BitWidth - 1)); in commonShiftTransforms() 1007 unsigned BitWidth = KnownCnt.getBitWidth(); in setShiftFlags() local 1010 uint64_t MaxCnt = KnownCnt.getMaxValue().getLimitedValue(BitWidth - 1); in setShiftFlags() 1059 unsigned BitWidth = Ty->getScalarSizeInBits(); in visitShl() local 1077 APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmtC)); in visitShl() 1083 C1->ult(BitWidth)) { in visitShl() 1108 C1->ult(BitWidth)) { in visitShl() [all …]
|
| H A D | InstCombineSimplifyDemanded.cpp | 66 if (unsigned BitWidth = Ty->getScalarSizeInBits()) in getBitWidth() local 67 return BitWidth; in getBitWidth() 171 uint32_t BitWidth = DemandedMask.getBitWidth(); in SimplifyDemandedUseBits() local 174 (!VTy->isIntOrIntVectorTy() || VTy->getScalarSizeInBits() == BitWidth) && in SimplifyDemandedUseBits() 175 Known.getBitWidth() == BitWidth && in SimplifyDemandedUseBits() 178 KnownBits LHSKnown(BitWidth), RHSKnown(BitWidth); in SimplifyDemandedUseBits() 200 DemandedFromOps = APInt::getLowBitsSet(BitWidth, BitWidth - NLZ); in SimplifyDemandedUseBits() 460 Known = InputKnown.zextOrTrunc(BitWidth); in SimplifyDemandedUseBits() 491 Known = InputKnown.sext(BitWidth); in SimplifyDemandedUseBits() 535 APInt DemandedFromOps = APInt::getLowBitsSet(BitWidth, BitWidth - NLZ); in SimplifyDemandedUseBits() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/Basic/Targets/ |
| H A D | AVR.h | 165 IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getIntTypeByWidth() argument 167 return BitWidth == 16 ? (IsSigned ? SignedInt : UnsignedInt) in getIntTypeByWidth() 168 : TargetInfo::getIntTypeByWidth(BitWidth, IsSigned); in getIntTypeByWidth() 171 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { in getLeastIntTypeByWidth() argument 173 return BitWidth == 16 in getLeastIntTypeByWidth() 175 : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned); in getLeastIntTypeByWidth()
|
| /freebsd/contrib/llvm-project/llvm/lib/InterfaceStub/ |
| H A D | IFSHandler.cpp | 108 IO.mapOptional("BitWidth", Target.BitWidth); in mapping() 224 !CopyStub->Target.BitWidth)) in writeIFSToOutputStream() 253 if (Stub.Target.BitWidth && *Stub.Target.BitWidth != *OverrideBitWidth) { in overrideIFSTarget() 257 Stub.Target.BitWidth = *OverrideBitWidth; in overrideIFSTarget() 272 if (Stub.Target.Arch || Stub.Target.BitWidth || Stub.Target.Endianness || in validateIFSTarget() 281 Stub.Target.BitWidth = TargetFromTriple.BitWidth; in validateIFSTarget() 286 if (!Stub.Target.Arch || !Stub.Target.BitWidth || !Stub.Target.Endianness) { in validateIFSTarget() 292 if (!Stub.Target.BitWidth) { in validateIFSTarget() 314 RetTarget.BitWidth = in parseTriple() 329 Stub.Target.BitWidth.reset(); in stripIFSTarget() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | ConstantRange.h | 62 LLVM_ABI 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() 366 uint32_t BitWidth) const; 372 LLVM_ABI ConstantRange zeroExtend(uint32_t BitWidth) const; 378 LLVM_ABI ConstantRange signExtend(uint32_t BitWidth) const; 384 LLVM_ABI ConstantRange truncate(uint32_t BitWidth) const; 388 LLVM_ABI ConstantRange zextOrTrunc(uint32_t BitWidth) const; [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/Basic/ |
| H A D | TargetInfo.cpp | 310 unsigned BitWidth, bool IsSigned) const { in getIntTypeByWidth() argument 311 if (getCharWidth() == BitWidth) in getIntTypeByWidth() 313 if (getShortWidth() == BitWidth) in getIntTypeByWidth() 315 if (getIntWidth() == BitWidth) in getIntTypeByWidth() 317 if (getLongWidth() == BitWidth) in getIntTypeByWidth() 319 if (getLongLongWidth() == BitWidth) in getIntTypeByWidth() 324 TargetInfo::IntType TargetInfo::getLeastIntTypeByWidth(unsigned BitWidth, in getLeastIntTypeByWidth() argument 326 if (getCharWidth() >= BitWidth) in getLeastIntTypeByWidth() 328 if (getShortWidth() >= BitWidth) in getLeastIntTypeByWidth() 330 if (getIntWidth() >= BitWidth) in getLeastIntTypeByWidth() [all …]
|