/freebsd/contrib/llvm-project/llvm/include/llvm/Bitstream/ |
H A D | BitstreamReader.h | 185 Expected<word_t> Read(unsigned NumBits) { 188 assert(NumBits && NumBits <= BitsInWord && in Read() 194 if (BitsInCurWord >= NumBits) { in Read() 195 word_t R = CurWord & (~word_t(0) >> (BitsInWord - NumBits)); in Read() 198 CurWord >>= (NumBits & Mask); in Read() 200 BitsInCurWord -= NumBits; in Read() 205 unsigned BitsLeft = NumBits - BitsInCurWord; in Read() 223 R |= R2 << (NumBits - BitsLeft); in Read() 228 Expected<uint32_t> ReadVBR(const unsigned NumBits) { 186 Read(unsigned NumBits) Read() argument 229 ReadVBR(const unsigned NumBits) ReadVBR() argument 264 ReadVBR64(const unsigned NumBits) ReadVBR64() argument [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/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/Support/ |
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 | 83 unsigned NumBits = MinVal.trunc(BitWidth - 1).countl_one(); in computeForAddSub() local 86 KnownOut.One.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() 97 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub() local 98 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() 119 unsigned NumBits = MinVal.trunc(BitWidth - 1).countl_one(); in computeForAddSub() local 120 KnownOut.One.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub() 125 unsigned NumBits = MaxVal.trunc(BitWidth - 1).countl_zero(); in computeForAddSub() local 126 KnownOut.Zero.setBits(BitWidth - 1 - NumBits, BitWidth - 1); in computeForAddSub()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
H A D | X86FixupVectorConstants.cpp | 86 unsigned NumBits = C->getType()->getPrimitiveSizeInBits(); in extractConstantBits() local 89 return APInt::getZero(NumBits); in extractConstantBits() 100 assert((NumBits % Bits->getBitWidth()) == 0 && "Illegal splat"); in extractConstantBits() 101 return APInt::getSplat(NumBits, *Bits); in extractConstantBits() 105 APInt Bits = APInt::getZero(NumBits); in extractConstantBits() 111 assert(NumBits == (E * SubBits->getBitWidth()) && in extractConstantBits() 125 APInt Bits = APInt::getZero(NumBits); in extractConstantBits() 142 unsigned NumBits) { in extractConstantBits() argument 144 return Bits->zextOrTrunc(NumBits); in extractConstantBits() 266 static Constant *rebuildZeroUpperCst(const Constant *C, unsigned NumBits, in rebuildZeroUpperCst() argument [all …]
|
/freebsd/contrib/llvm-project/llvm/utils/TableGen/Common/ |
H A D | VarLenCodeEmitterGen.cpp | 128 : TheDef(TheDef), NumBits(0U), HasDynamicSegment(false) { in VarLenInst() 131 NumBits += S.BitWidth; in VarLenInst() 170 const Init *OperandName = DI->getArg(0), *NumBits = DI->getArg(1); in buildRec() local 171 if (!isa<StringInit>(OperandName) || !isa<IntInit>(NumBits)) in buildRec() 174 auto NumBitsVal = cast<IntInit>(NumBits)->getValue(); in buildRec() 200 unsigned NumBits = 0U; in buildRec() local 203 NumBits = static_cast<unsigned>(LoBitVal - HiBitVal + 1); in buildRec() 205 NumBits = static_cast<unsigned>(HiBitVal - LoBitVal + 1); in buildRec() 214 Segments.push_back({NumBits, in buildRec() 218 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/Interp/ |
H A D | Boolean.h | 56 APSInt toAPSInt(unsigned NumBits) const { in toAPSInt() argument 57 return APSInt(toAPSInt().zextOrTrunc(NumBits), true); in toAPSInt() 90 static Boolean min(unsigned NumBits) { return Boolean(false); } in min() argument 91 static Boolean max(unsigned NumBits) { return Boolean(true); } in max() argument 108 static Boolean from(T Value, unsigned NumBits) { in from() argument 112 static bool inRange(int64_t Value, unsigned NumBits) { in inRange() argument
|
H A D | IntegralAP.h | 96 template <typename T> static IntegralAP from(T Value, unsigned NumBits = 0) { 97 assert(NumBits > 0); 98 APInt Copy = APInt(NumBits, static_cast<uint64_t>(Value), Signed); 104 static IntegralAP from(IntegralAP<InputSigned> V, unsigned NumBits = 0) { 105 if (NumBits == 0) 106 NumBits = V.bitWidth(); 109 return IntegralAP<Signed>(V.V.sextOrTrunc(NumBits)); 110 return IntegralAP<Signed>(V.V.zextOrTrunc(NumBits));
|
H A D | Integral.h | 109 APSInt toAPSInt(unsigned NumBits) const { 111 return APSInt(toAPSInt().sextOrTrunc(NumBits), !Signed); 113 return APSInt(toAPSInt().zextOrTrunc(NumBits), !Signed); 162 static Integral min(unsigned NumBits) { 165 static Integral max(unsigned NumBits) { 184 template <typename T> static Integral from(T Value, unsigned NumBits) { 188 static bool inRange(int64_t Value, unsigned NumBits) {
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/Disassembler/ |
H A D | AMDGPUDisassembler.h | 46 void insertBits(uint64_t SubBits, unsigned BitPosition, unsigned NumBits) { in insertBits() argument 47 assert(NumBits && NumBits <= 64); in insertBits() 48 assert(SubBits >> 1 >> (NumBits - 1) == 0); in insertBits() 57 uint64_t extractBitsAsZExtValue(unsigned NumBits, in extractBitsAsZExtValue() argument 59 assert(NumBits && NumBits <= 64); in extractBitsAsZExtValue() 66 return Val & ((uint64_t(2) << (NumBits - 1)) - 1); in extractBitsAsZExtValue()
|
/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 | 657 unsigned NumBits = 0; in rewriteT2FrameIndex() local 667 NumBits = 8; in rewriteT2FrameIndex() 672 NumBits = 12; in rewriteT2FrameIndex() 680 NumBits = 8; in rewriteT2FrameIndex() 694 NumBits = 8; in rewriteT2FrameIndex() 708 case ARMII::AddrModeT2_i7s4: NumBits = 9; OffsetMask = 0x3; break; in rewriteT2FrameIndex() 709 case ARMII::AddrModeT2_i7s2: NumBits = 8; OffsetMask = 0x1; break; in rewriteT2FrameIndex() 710 default: NumBits = 7; OffsetMask = 0x0; break; in rewriteT2FrameIndex() 718 NumBits = 8 + 2; in rewriteT2FrameIndex() 724 NumBits = 8; // 8 bits scaled by 4 in rewriteT2FrameIndex() [all …]
|
H A D | ARMBaseRegisterInfo.cpp | 734 unsigned NumBits = 0; in isFrameOffsetLegal() local 746 NumBits = 8; in isFrameOffsetLegal() 749 NumBits = 12; in isFrameOffsetLegal() 754 NumBits = 8; in isFrameOffsetLegal() 759 NumBits = 12; in isFrameOffsetLegal() 762 NumBits = 8; in isFrameOffsetLegal() 765 NumBits = (BaseReg == ARM::SP ? 8 : 5); in isFrameOffsetLegal() 782 unsigned Mask = (1 << NumBits) - 1; in isFrameOffsetLegal()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
H A D | GISelKnownBits.cpp | 721 unsigned NumBits = computeNumSignBitsFromRangeMetadata(Ld, TyBits); in computeNumSignBits() local 722 if (NumBits != 1) in computeNumSignBits() 723 return NumBits; in computeNumSignBits() 736 unsigned NumBits = computeNumSignBitsFromRangeMetadata(Ld, TyBits); in computeNumSignBits() local 737 if (NumBits != 1) in computeNumSignBits() 738 return NumBits; in computeNumSignBits() 813 unsigned NumBits = in computeNumSignBits() local 815 if (NumBits > 1) in computeNumSignBits() 816 FirstAnswer = std::max(FirstAnswer, NumBits); in computeNumSignBits()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineShifts.cpp | 571 static bool canEvaluateShifted(Value *V, unsigned NumBits, bool IsLeftShift, in canEvaluateShifted() argument 590 return canEvaluateShifted(I->getOperand(0), NumBits, IsLeftShift, IC, I) && in canEvaluateShifted() 591 canEvaluateShifted(I->getOperand(1), NumBits, IsLeftShift, IC, I); in canEvaluateShifted() 595 return canEvaluateShiftedShift(NumBits, IsLeftShift, I, IC, CxtI); in canEvaluateShifted() 601 return canEvaluateShifted(TrueVal, NumBits, IsLeftShift, IC, SI) && in canEvaluateShifted() 602 canEvaluateShifted(FalseVal, NumBits, IsLeftShift, IC, SI); in canEvaluateShifted() 610 if (!canEvaluateShifted(IncValue, NumBits, IsLeftShift, IC, PN)) in canEvaluateShifted() 618 MulConst->isNegatedPowerOf2() && MulConst->countr_zero() == NumBits; in canEvaluateShifted() 688 static Value *getShiftedValue(Value *V, unsigned NumBits, bool isLeftShift, in getShiftedValue() argument 693 return IC.Builder.CreateShl(C, NumBits); in getShiftedValue() [all …]
|
/freebsd/contrib/llvm-project/llvm/utils/TableGen/ |
H A D | AsmWriterEmitter.cpp | 401 unsigned NumBits = Log2_32_Ceil(UniqueOperandCommands.size()); in EmitGetMnemonic() local 404 if (NumBits > BitsLeft) { in EmitGetMnemonic() 405 LLVM_DEBUG(errs() << "Not enough bits to densely encode " << NumBits in EmitGetMnemonic() 426 BitsLeft -= NumBits; in EmitGetMnemonic() 525 unsigned NumBits = Log2_32_Ceil(Commands.size()); in EmitPrintInstruction() local 526 assert(NumBits <= BitsLeft && "consistency error"); in EmitPrintInstruction() 529 O << "\n // Fragment " << i << " encoded into " << NumBits << " bits for " in EmitPrintInstruction() 535 << ((1 << NumBits) - 1) << ") {\n" in EmitPrintInstruction() 543 << ((1 << NumBits) - 1) << ") {\n" in EmitPrintInstruction() 554 BitsLeft -= NumBits; in EmitPrintInstruction()
|
H A D | DecoderEmitter.cpp | 313 unsigned NumBits; // number of bits to filter member in __anonfc09cd8b0311::Filter 496 unsigned NumBits) const; 588 : Owner(f.Owner), StartBit(f.StartBit), NumBits(f.NumBits), Mixed(f.Mixed), in Filter() 596 : Owner(&owner), StartBit(startBit), NumBits(numBits), Mixed(mixed) { in Filter() 597 assert(StartBit + NumBits - 1 < Owner->BitWidth); in Filter() 609 auto [Ok, Field] = Owner->fieldFromInsn(Insn, StartBit, NumBits); in Filter() 640 for (unsigned bitIndex = 0; bitIndex < NumBits; ++bitIndex) in recurse() 663 for (unsigned bitIndex = 0; bitIndex < NumBits; ++bitIndex) { in recurse() 703 assert((NumBits < (1u << 8)) && "NumBits overflowed uint8 table entry!"); in emitTableEntry() 710 TableInfo.Table.push_back(NumBits); in emitTableEntry() [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 513 return APSInt(APInt(NumBits, Value.Enum), IsUnsigned);
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | GCNRewritePartialRegUses.cpp | 272 unsigned NumBits = TRI->getRegSizeInBits(*RC); in getRegClassWithShiftedSubregs() local 273 if (NumBits < MinNumBits && NumBits >= RegNumBits) { in getRegClassWithShiftedSubregs() 274 MinNumBits = NumBits; in getRegClassWithShiftedSubregs()
|
/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()
|
/freebsd/contrib/llvm-project/llvm/lib/IR/ |
H A D | Type.cpp | 278 IntegerType *IntegerType::get(LLVMContext &C, unsigned NumBits) { in get() argument 279 assert(NumBits >= MIN_INT_BITS && "bitwidth too small"); in get() 280 assert(NumBits <= MAX_INT_BITS && "bitwidth too large"); in get() 283 switch (NumBits) { in get() 294 IntegerType *&Entry = C.pImpl->IntegerTypes[NumBits]; in get() 297 Entry = new (C.pImpl->Alloc) IntegerType(C, NumBits); in get()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | KnownBits.h | 214 KnownBits extractBits(unsigned NumBits, unsigned BitPosition) const { in extractBits() 215 return KnownBits(Zero.extractBits(NumBits, BitPosition), in extractBits() 216 One.extractBits(NumBits, BitPosition)); in extractBits()
|