| /freebsd/contrib/llvm-project/llvm/include/llvm/Bitstream/ |
| H A D | BitstreamReader.h | 186 Expected<word_t> Read(unsigned NumBits) { in Read() argument 189 assert(NumBits && NumBits <= BitsInWord && in Read() 195 if (BitsInCurWord >= NumBits) { in Read() 196 word_t R = CurWord & (~word_t(0) >> (BitsInWord - NumBits)); in Read() 199 CurWord >>= (NumBits & Mask); in Read() 201 BitsInCurWord -= NumBits; in Read() 206 unsigned BitsLeft = NumBits - BitsInCurWord; in Read() 224 R |= R2 << (NumBits - BitsLeft); in Read() 229 Expected<uint32_t> ReadVBR(const unsigned NumBits) { in ReadVBR() argument 230 Expected<unsigned> MaybeRead = Read(NumBits); in ReadVBR() [all …]
|
| H A D | BitstreamWriter.h | 282 void Emit(uint32_t Val, unsigned NumBits) { in Emit() argument 283 assert(NumBits && NumBits <= 32 && "Invalid value size!"); in Emit() 284 assert((Val & ~(~0U >> (32-NumBits))) == 0 && "High bits set!"); in Emit() 286 if (CurBit + NumBits < 32) { in Emit() 287 CurBit += NumBits; in Emit() 298 CurBit = (CurBit+NumBits) & 31; in Emit() 309 void EmitVBR(uint32_t Val, unsigned NumBits) { in EmitVBR() argument 310 assert(NumBits <= 32 && "Too many bits to emit!"); in EmitVBR() 311 uint32_t Threshold = 1U << (NumBits-1); in EmitVBR() 315 Emit((Val & ((1U << (NumBits - 1)) - 1)) | (1U << (NumBits - 1)), in EmitVBR() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | TrieRawHashMap.cpp | 74 static std::unique_ptr<TrieSubtrie> create(size_t StartBit, size_t NumBits); 76 explicit TrieSubtrie(size_t StartBit, size_t NumBits); 80 static constexpr size_t sizeToAlloc(unsigned NumBits) { in sizeToAlloc() argument 81 assert(NumBits < 20 && "Tries should have fewer than ~1M slots"); in sizeToAlloc() 82 unsigned Count = 1u << NumBits; in sizeToAlloc() 108 unsigned NumBits = 0; member in __anon657929bc0111::TrieSubtrie 120 size_t NumBits) { in create() argument 121 void *Memory = ::operator new(sizeToAlloc(NumBits)); in create() 122 TrieSubtrie *S = ::new (Memory) TrieSubtrie(StartBit, NumBits); in create() 126 TrieSubtrie::TrieSubtrie(size_t StartBit, size_t NumBits) in TrieSubtrie() argument [all …]
|
| H A D | APSInt.cpp | 25 unsigned NumBits = ((Str.size() * 64) / 19) + 2; in APSInt() local 26 APInt Tmp(NumBits, Str, /*radix=*/10); in APSInt() 29 if (MinBits < NumBits) in APSInt() 35 if (ActiveBits < NumBits) in APSInt()
|
| H A D | KnownBits.cpp | 92 unsigned NumBits = MinVal.trunc(BitWidth - 1).countl_one(); in computeForAddSub() local 95 KnownOut.One.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() 106 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub() local 107 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() 128 unsigned NumBits = MinVal.trunc(BitWidth - 1).countl_one(); in computeForAddSub() local 129 KnownOut.One.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() 134 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub() local 135 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
| H A D | TrieHashIndexGenerator.h | 88 size_t NumBits) { in getIndex() 104 if (CurrentNumBits > NumBits) { in getIndex() 105 Byte >>= CurrentNumBits - NumBits; in getIndex() 106 CurrentNumBits = NumBits; in getIndex() 111 assert(NumBits >= CurrentNumBits); in getIndex() 112 NumBits -= CurrentNumBits; in getIndex() 113 if (!NumBits) in getIndex()
|
| H A D | Bitset.h | 29 template <unsigned NumBits> 38 static constexpr unsigned NumWords = (NumBits + BITWORD_SIZE-1) / BITWORD_SIZE; 79 constexpr size_t size() const { return NumBits; } in size()
|
| /freebsd/contrib/llvm-project/llvm/lib/TextAPI/ |
| H A D | Architecture.cpp | 24 #define ARCHINFO(Arch, Type, Subtype, NumBits) \ in getArchitectureFromCpuType() argument 36 #define ARCHINFO(Arch, Type, Subtype, NumBits) .Case(#Arch, AK_##Arch) in getArchitectureFromName() argument 44 #define ARCHINFO(Arch, Type, Subtype, NumBits) \ in getArchitectureName() argument 60 #define ARCHINFO(Arch, Type, Subtype, NumBits) \ in getCPUTypeFromArchitecture() argument 80 #define ARCHINFO(Arch, Type, Subtype, NumBits) \ in is64Bit() argument 82 return NumBits == 64; in is64Bit()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
| H A D | X86FixupVectorConstants.cpp | 85 unsigned NumBits = C->getType()->getPrimitiveSizeInBits(); in extractConstantBits() local 88 return APInt::getZero(NumBits); in extractConstantBits() 92 return APInt::getSplat(NumBits, CInt->getValue()); in extractConstantBits() 99 return APInt::getSplat(NumBits, CFP->getValue().bitcastToAPInt()); in extractConstantBits() 107 assert((NumBits % Bits->getBitWidth()) == 0 && "Illegal splat"); in extractConstantBits() 108 return APInt::getSplat(NumBits, *Bits); in extractConstantBits() 112 APInt Bits = APInt::getZero(NumBits); in extractConstantBits() 118 assert(NumBits == (E * SubBits->getBitWidth()) && in extractConstantBits() 132 APInt Bits = APInt::getZero(NumBits); in extractConstantBits() 149 unsigned NumBits) { in extractConstantBits() argument [all …]
|
| /freebsd/contrib/llvm-project/llvm/utils/TableGen/Common/ |
| H A D | VarLenCodeEmitterGen.cpp | 130 : TheDef(TheDef), NumBits(0U), HasDynamicSegment(false) { in VarLenInst() 133 NumBits += S.BitWidth; in VarLenInst() 172 const Init *OperandName = DI->getArg(0), *NumBits = DI->getArg(1); in buildRec() local 173 if (!isa<StringInit>(OperandName) || !isa<IntInit>(NumBits)) in buildRec() 176 auto NumBitsVal = cast<IntInit>(NumBits)->getValue(); in buildRec() 202 unsigned NumBits = 0U; in buildRec() local 205 NumBits = static_cast<unsigned>(LoBitVal - HiBitVal + 1); in buildRec() 207 NumBits = static_cast<unsigned>(HiBitVal - LoBitVal + 1); in buildRec() 218 Segments.push_back({NumBits, DagInit::get(DI->getOperator(), NewArgs), in buildRec() 221 Segments.push_back({NumBits, DI, CustomEncoder, CustomDecoder}); in buildRec() [all …]
|
| H A D | VarLenCodeEmitterGen.h | 30 size_t NumBits; variable 40 VarLenInst() : TheDef(nullptr), NumBits(0U), HasDynamicSegment(false) {} in VarLenInst() 45 size_t size() const { return NumBits; } in size()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/CSKY/ |
| H A D | CSKYRegisterInfo.cpp | 135 unsigned NumBits = 0; in IsLegalOffset() local 140 NumBits = 12; in IsLegalOffset() 144 NumBits = 12; in IsLegalOffset() 148 NumBits = 12; in IsLegalOffset() 152 NumBits = 5; in IsLegalOffset() 156 NumBits = 5; in IsLegalOffset() 160 NumBits = 5; in IsLegalOffset() 164 NumBits = 8; in IsLegalOffset() 174 unsigned Mask = (1 << NumBits) - 1; in IsLegalOffset()
|
| /freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/ |
| H A D | Boolean.h | 52 APSInt toAPSInt(unsigned NumBits) const { in toAPSInt() argument 53 return APSInt(toAPSInt().zextOrTrunc(NumBits), true); in toAPSInt() 94 static Boolean min(unsigned NumBits) { return Boolean(false); } in min() argument 95 static Boolean max(unsigned NumBits) { return Boolean(true); } in max() argument 111 template <typename T> static Boolean from(T Value, unsigned NumBits) { in from() argument 115 static bool inRange(int64_t Value, unsigned NumBits) { in inRange() argument
|
| H A D | InterpBuiltinBitCast.cpp | 302 Bits NumBits = Bits( in readPointerToBuffer() local 304 assert(NumBits.isFullByte()); in readPointerToBuffer() 305 assert(NumBits.getQuantity() <= FullBitWidth.getQuantity()); in readPointerToBuffer() 310 swapBytes(Buff.get(), NumBits.roundToBytes()); in readPointerToBuffer() 312 Buffer.markInitialized(BitOffset, NumBits); in readPointerToBuffer() 397 Bits NumBits = Bits(llvm::APFloatBase::getSizeInBits(Semantics)); in DoBitCastPtr() local 398 assert(NumBits.isFullByte()); in DoBitCastPtr() 399 assert(NumBits.getQuantity() <= FullBitWidth.getQuantity()); in DoBitCastPtr() 400 auto M = Buffer.copyBits(BitOffset, NumBits, FullBitWidth, in DoBitCastPtr() 404 swapBytes(M.get(), NumBits.roundToBytes()); in DoBitCastPtr()
|
| H A D | IntegralAP.h | 130 template <typename T> static IntegralAP from(T Value, unsigned NumBits = 0) { 131 if (NumBits == 0) 132 NumBits = sizeof(T) * 8; 133 assert(NumBits > 0); 134 assert(APInt::getNumWords(NumBits) == 1); 135 APInt Copy = APInt(NumBits, static_cast<uint64_t>(Value), Signed);
|
| H A D | Integral.h | 203 static Integral min(unsigned NumBits) { return Integral(Min); } 204 static Integral max(unsigned NumBits) { return Integral(Max); } 221 template <typename T> static Integral from(T Value, unsigned NumBits) { 225 static bool inRange(int64_t Value, unsigned NumBits) {
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
| H A D | size_class_map.h | 52 // - NumBits: the number of non-zero bits in sizes after 2^MidSizeLog. 53 // eg. with NumBits==3 all size classes after 2^MidSizeLog look like 67 static const u8 S = Config::NumBits - 1; 115 static const u8 S = Config::NumBits - 1; 225 static const uptr NumBits = 3; member 237 static const uptr NumBits = 3; member 250 static const uptr NumBits = 7; member 265 static const uptr NumBits = 8; 293 static const uptr NumBits = 1; 294 static const uptr NumBits = 4; global() member 315 static const uptr NumBits = 1; global() member
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
| H A D | Thumb2InstrInfo.cpp | 659 unsigned NumBits = 0; in rewriteT2FrameIndex() local 669 NumBits = 8; in rewriteT2FrameIndex() 674 NumBits = 12; in rewriteT2FrameIndex() 682 NumBits = 8; in rewriteT2FrameIndex() 696 NumBits = 8; in rewriteT2FrameIndex() 710 case ARMII::AddrModeT2_i7s4: NumBits = 9; OffsetMask = 0x3; break; in rewriteT2FrameIndex() 711 case ARMII::AddrModeT2_i7s2: NumBits = 8; OffsetMask = 0x1; break; in rewriteT2FrameIndex() 712 default: NumBits = 7; OffsetMask = 0x0; break; in rewriteT2FrameIndex() 720 NumBits = 8 + 2; in rewriteT2FrameIndex() 726 NumBits = 8; // 8 bits scaled by 4 in rewriteT2FrameIndex() [all …]
|
| H A D | ARMBaseRegisterInfo.cpp | 763 unsigned NumBits = 0; in isFrameOffsetLegal() local 775 NumBits = 8; in isFrameOffsetLegal() 778 NumBits = 12; in isFrameOffsetLegal() 783 NumBits = 8; in isFrameOffsetLegal() 788 NumBits = 12; in isFrameOffsetLegal() 791 NumBits = 8; in isFrameOffsetLegal() 794 NumBits = (BaseReg == ARM::SP ? 8 : 5); in isFrameOffsetLegal() 811 unsigned Mask = (1 << NumBits) - 1; in isFrameOffsetLegal()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/Disassembler/ |
| H A D | AMDGPUDisassembler.h | 46 uint64_t extractBitsAsZExtValue(unsigned NumBits, in extractBitsAsZExtValue() argument 48 assert(NumBits && NumBits <= 64); in extractBitsAsZExtValue() 55 return Val & ((uint64_t(2) << (NumBits - 1)) - 1); in extractBitsAsZExtValue()
|
| /freebsd/contrib/llvm-project/llvm/utils/TableGen/ |
| H A D | DecoderEmitter.cpp | 387 unsigned NumBits; // number of bits to filter member in __anonfc09cd8b0211::Filter 505 unsigned NumBits; member 564 unsigned NumBits) const; 649 : Owner(f.Owner), StartBit(f.StartBit), NumBits(f.NumBits), Mixed(f.Mixed), in Filter() 657 : Owner(owner), StartBit(startBit), NumBits(numBits), Mixed(mixed) { in Filter() 658 assert(StartBit + NumBits - 1 < Owner.BitWidth); in Filter() 670 auto [Ok, Field] = Owner.fieldFromInsn(Insn, StartBit, NumBits); in Filter() 701 for (unsigned bitIndex = 0; bitIndex < NumBits; ++bitIndex) in recurse() 723 for (unsigned bitIndex = 0; bitIndex < NumBits; ++bitIndex) in recurse() 748 assert(isUInt<8>(NumBits) && "NumBits overflowed uint8 table entry!"); in emitTableEntry() [all …]
|
| H A D | AsmWriterEmitter.cpp | 402 unsigned NumBits = Log2_32_Ceil(UniqueOperandCommands.size()); in EmitGetMnemonic() local 405 if (NumBits > BitsLeft) { in EmitGetMnemonic() 406 LLVM_DEBUG(errs() << "Not enough bits to densely encode " << NumBits in EmitGetMnemonic() 427 BitsLeft -= NumBits; in EmitGetMnemonic() 526 unsigned NumBits = Log2_32_Ceil(Commands.size()); in EmitPrintInstruction() local 527 assert(NumBits <= BitsLeft && "consistency error"); in EmitPrintInstruction() 530 O << "\n // Fragment " << i << " encoded into " << NumBits << " bits for " in EmitPrintInstruction() 536 << ((1 << NumBits) - 1) << ") {\n" in EmitPrintInstruction() 544 << ((1 << NumBits) - 1) << ") {\n" in EmitPrintInstruction() 555 BitsLeft -= NumBits; in EmitPrintInstruction()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineShifts.cpp | 587 static bool canEvaluateShifted(Value *V, unsigned NumBits, bool IsLeftShift, in canEvaluateShifted() argument 606 return canEvaluateShifted(I->getOperand(0), NumBits, IsLeftShift, IC, I) && in canEvaluateShifted() 607 canEvaluateShifted(I->getOperand(1), NumBits, IsLeftShift, IC, I); in canEvaluateShifted() 611 return canEvaluateShiftedShift(NumBits, IsLeftShift, I, IC, CxtI); in canEvaluateShifted() 617 return canEvaluateShifted(TrueVal, NumBits, IsLeftShift, IC, SI) && in canEvaluateShifted() 618 canEvaluateShifted(FalseVal, NumBits, IsLeftShift, IC, SI); in canEvaluateShifted() 626 if (!canEvaluateShifted(IncValue, NumBits, IsLeftShift, IC, PN)) in canEvaluateShifted() 634 MulConst->isNegatedPowerOf2() && MulConst->countr_zero() == NumBits; in canEvaluateShifted() 704 static Value *getShiftedValue(Value *V, unsigned NumBits, bool isLeftShift, in getShiftedValue() argument 709 return IC.Builder.CreateShl(C, NumBits); in getShiftedValue() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/DebugInfo/PDB/ |
| H A D | PDBTypes.h | 486 #define VARIANT_WIDTH(Enum, NumBits) \ argument 488 return NumBits; 511 #define VARIANT_APSINT(Enum, NumBits, IsUnsigned) \ argument 514 APInt(NumBits, static_cast<uint64_t>(Value.Enum), !IsUnsigned), \
|
| /freebsd/contrib/llvm-project/clang/lib/Lex/ |
| H A D | PPExpressions.cpp | 396 unsigned NumBits; in EvaluateValue() local 398 NumBits = TI.getIntWidth(); in EvaluateValue() 400 NumBits = TI.getWCharWidth(); in EvaluateValue() 402 NumBits = TI.getChar16Width(); in EvaluateValue() 404 NumBits = TI.getChar32Width(); in EvaluateValue() 406 NumBits = TI.getCharWidth(); in EvaluateValue() 409 llvm::APSInt Val(NumBits); in EvaluateValue()
|