| /freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/ |
| H A D | BitcastBuffer.h | 24 struct Bits { struct 26 Bits() = default; argument 27 static Bits zero() { return Bits(0); } in zero() argument 28 explicit Bits(size_t Quantity) : N(Quantity) {} in Bits() function 37 Bits operator-(Bits Other) const { return Bits(N - Other.N); } argument 38 Bits operator+(Bits Other) const { return Bits(N + Other.N); } 39 Bits operator+=(size_t O) { 43 Bits operator+=(Bits O) { 48 bool operator>=(Bits Other) const { return N >= Other.N; } 49 bool operator<=(Bits Other) const { return N <= Other.N; } [all …]
|
| H A D | BitcastBuffer.cpp | 15 static inline bool bitof(const std::byte *B, Bits BitIndex) { in bitof() 20 void BitcastBuffer::pushData(const std::byte *In, Bits BitOffset, Bits BitWidth, in pushData() 23 bool BitValue = bitof(In, Bits(It)); in pushData() 27 Bits DstBit; in pushData() 29 DstBit = BitOffset + Bits(It); in pushData() 31 DstBit = size() - BitOffset - BitWidth + Bits(It); in pushData() 39 BitcastBuffer::copyBits(Bits BitOffset, Bits BitWidth, Bits FullBitWidth, in copyBits() 46 Bits BitIndex; in copyBits() 48 BitIndex = BitOffset + Bits(It); in copyBits() 50 BitIndex = size() - BitWidth - BitOffset + Bits(It); in copyBits() [all …]
|
| H A D | InterpBuiltinBitCast.cpp | 39 llvm::function_ref<bool(const Pointer &P, PrimType Ty, Bits BitOffset, 40 Bits FullBitWidth, bool PackedBools)>; 80 static bool enumerateData(const Pointer &P, const Context &Ctx, Bits Offset, in enumerateData() 81 Bits BitsToRead, DataFunc F) { in enumerateData() 87 Bits FullBitWidth = in enumerateData() 88 Bits(Ctx.getASTContext().getTypeSize(FieldDesc->getType())); in enumerateData() 96 Bits ElemSize = Bits(Ctx.getASTContext().getTypeSize(ElemType)); in enumerateData() 105 Offset += PackedBools ? Bits(1) : ElemSize; in enumerateData() 115 Bits ElemSize = Bits(Ctx.getASTContext().getTypeSize(ElemType)); in enumerateData() 136 Bits BitOffset = in enumerateData() [all …]
|
| /freebsd/contrib/llvm-project/libc/src/__support/FPUtil/ |
| H A D | dyadic_float.h | 41 template <size_t Bits> 43 rounding_direction(const LIBC_NAMESPACE::UInt<Bits> &value, size_t rshift, in rounding_direction() 45 if (rshift == 0 || (rshift < Bits && (value << (Bits - rshift)) == 0) || in rounding_direction() 46 (rshift >= Bits && value == 0)) in rounding_direction() 51 if (rshift > 0 && rshift <= Bits && value.get_bit(rshift - 1)) { in rounding_direction() 55 bool round_bit = rshift < Bits ? value.get_bit(rshift) : 0; in rounding_direction() 56 return round_bit != 0 || (value << (Bits - rshift + 1)) != 0 ? +1 : -1; in rounding_direction() 64 (rshift < Bits && (value << (Bits - rshift)) != 0) in rounding_direction() 69 (rshift < Bits && (value << (Bits - rshift)) != 0) in rounding_direction() 88 template <size_t Bits> struct DyadicFloat { [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
| H A D | BitVector.h | 92 Storage Bits; // Actual bits. variable 106 WordRef = &b.Bits[Idx / BITWORD_SIZE]; in reference() 150 : Bits(NumBitWords(s), 0 - (BitWord)t), Size(s) { in NumBitWords() 164 for (auto Bit : Bits) in count() 171 return any_of(Bits, [](BitWord Bit) { return Bit != 0; }); in any() 177 if (Bits[i] != ~BitWord(0)) in all() 182 return Bits[Size / BITWORD_SIZE] == (BitWord(1) << Remainder) - 1; in all() 209 BitWord Copy = Bits[i]; 241 BitWord Copy = Bits[CurrentWord]; in find_last_in() 278 BitWord Copy = Bits[CurrentWord]; in find_last_unset_in() [all …]
|
| H A D | PackedVector.h | 31 static T getValue(const BitVectorTy &Bits, unsigned Idx) { in getValue() argument 34 val = T(val | ((Bits[(Idx << (BitNum-1)) + i] ? 1UL : 0UL) << i)); in getValue() 38 static void setValue(BitVectorTy &Bits, unsigned Idx, T val) { in setValue() argument 41 Bits[(Idx << (BitNum-1)) + i] = val & (T(1) << i); in setValue() 48 static T getValue(const BitVectorTy &Bits, unsigned Idx) { in getValue() argument 51 val = T(val | ((Bits[(Idx << (BitNum-1)) + i] ? 1UL : 0UL) << i)); in getValue() 52 if (Bits[(Idx << (BitNum-1)) + BitNum-1]) in getValue() 57 static void setValue(BitVectorTy &Bits, unsigned Idx, T val) { in setValue() argument 60 Bits.set((Idx << (BitNum-1)) + BitNum-1); in setValue() 64 Bits[(Idx << (BitNum-1)) + i] = val & (T(1) << i); in setValue() [all …]
|
| H A D | Bitset.h | 39 std::array<BitWord, NumWords> Bits{}; 43 : Bits{B} {} in Bitset() 53 llvm::fill(Bits, -BitWord(0)); in set() 58 Bits[I / BITWORD_SIZE] |= BitWord(1) << (I % BITWORD_SIZE); in set() 63 Bits[I / BITWORD_SIZE] &= ~(BitWord(1) << (I % BITWORD_SIZE)); in reset() 68 Bits[I / BITWORD_SIZE] ^= BitWord(1) << (I % BITWORD_SIZE); in flip() 74 return (Bits[I / BITWORD_SIZE] & Mask) != 0; 82 return llvm::any_of(Bits, [](BitWord I) { return I != 0; }); in any() 87 for (auto B : Bits) in count() 93 for (unsigned I = 0, E = Bits.size(); I != E; ++I) { [all …]
|
| H A D | SparseBitVector.h | 55 BitWord Bits[BITWORDS_PER_ELEMENT]; member 59 memset(&Bits[0], 0, sizeof (BitWord) * BITWORDS_PER_ELEMENT); in SparseBitVectorElement() 65 memset(&Bits[0], 0, sizeof (BitWord) * BITWORDS_PER_ELEMENT); in SparseBitVectorElement() 73 if (Bits[i] != RHS.Bits[i]) 85 return Bits[Idx]; in word() 94 if (Bits[i]) in empty() 100 Bits[Idx / BITWORD_SIZE] |= 1L << (Idx % BITWORD_SIZE); in set() 113 Bits[Idx / BITWORD_SIZE] &= ~(1L << (Idx % BITWORD_SIZE)); in reset() 117 return Bits[Id in test() 335 typename SparseBitVectorElement<ElementSize>::BitWord Bits; global() variable [all...] |
| H A D | PointerEmbeddedInt.h | 32 template <typename IntT, int Bits = sizeof(IntT) * CHAR_BIT> 38 static_assert(Bits < sizeof(uintptr_t) * CHAR_BIT, 44 Shift = sizeof(uintptr_t) * CHAR_BIT - Bits, 47 Mask = static_cast<uintptr_t>(-1) << Bits 64 assert((std::is_signed<IntT>::value ? isInt<Bits>(I) : isUInt<Bits>(I)) && 81 template <typename IntT, int Bits> 82 struct PointerLikeTypeTraits<PointerEmbeddedInt<IntT, Bits>> { 83 using T = PointerEmbeddedInt<IntT, Bits>; 102 template <typename IntT, int Bits> 103 struct DenseMapInfo<PointerEmbeddedInt<IntT, Bits>> { [all …]
|
| H A D | Bitfields.h | 94 template <typename T, unsigned Bits> struct BitPatterns { 103 static_assert(TypeBits >= Bits, "n-bit must fit in T"); 109 static constexpr Unsigned Umax = AllOnes >> (TypeBits - Bits); // 00111111 110 static constexpr Unsigned SignBitMask = Unsigned(1) << (Bits - 1); // 00100000 120 template <typename T, unsigned Bits, bool = std::is_unsigned<T>::value> 123 using BP = BitPatterns<T, Bits>; 134 template <typename T, unsigned Bits> struct Compressor<T, Bits, false> { 136 using BP = BitPatterns<T, Bits>; 160 using C = Compressor<IntegerType, Bitfield::Bits>; 161 using BP = BitPatterns<StorageType, Bitfield::Bits>; [all …]
|
| H A D | SmallBitVector.h | 202 uintptr_t Bits = getSmallBits(); in count() local 203 return llvm::popcount(Bits); in count() 232 uintptr_t Bits = getSmallBits(); in find_first() local 233 if (Bits == 0) in find_first() 235 return llvm::countr_zero(Bits); in find_first() 242 uintptr_t Bits = getSmallBits(); in find_last() local 243 if (Bits == 0) in find_last() 245 return NumBaseBits - llvm::countl_zero(Bits) - 1; in find_last() 256 uintptr_t Bits = getSmallBits(); in find_first_unset() local 257 return llvm::countr_one(Bits); in find_first_unset() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/TargetParser/ |
| H A D | SubtargetFeature.h | 45 std::array<uint64_t, MAX_SUBTARGET_WORDS> Bits{}; 49 : Bits{B} {} in FeatureBitset() 59 llvm::fill(Bits, -1ULL); in set() 64 Bits[I / 64] |= uint64_t(1) << (I % 64); in set() 69 Bits[I / 64] &= ~(uint64_t(1) << (I % 64)); in reset() 74 Bits[I / 64] ^= uint64_t(1) << (I % 64); in flip() 80 return (Bits[I / 64] & Mask) != 0; 88 return llvm::any_of(Bits, [](uint64_t I) { return I != 0; }); in any() 93 for (auto B : Bits) in count() 99 for (unsigned I = 0, E = Bits.size(); I != E; ++I) { [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
| H A D | PPCMachineFunctionInfo.cpp | 101 int Bits = 0; in getVecExtParmsType() local 112 Bits += XCOFF::TracebackTable::WidthOfParamType; in getVecExtParmsType() 118 Bits += XCOFF::TracebackTable::WidthOfParamType; in getVecExtParmsType() 124 Bits += XCOFF::TracebackTable::WidthOfParamType; in getVecExtParmsType() 130 Bits += XCOFF::TracebackTable::WidthOfParamType; in getVecExtParmsType() 137 if (Bits >= 32) in getVecExtParmsType() 140 return Bits < 32 ? VectExtParamInfo << (32 - Bits) : VectExtParamInfo; in getVecExtParmsType() 147 int Bits = 0; in getParmsType() local 150 if (Bits > 31 || (Bits > 30 && (Elt != FixedType || hasVectorParms()))) in getParmsType() 160 Bits += XCOFF::TracebackTable::WidthOfParamType; in getParmsType() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | FoldingSet.cpp | 49 Bits.reserve(Bits.size() + NumInserts); in AddString() 51 Bits.push_back(Size); in AddString() 60 Bits.append(Base, Base + Units); in AddString() 74 Bits.push_back(V); in AddString() 82 Bits.push_back(V); in AddString() 98 Bits.push_back(V); in AddString() 103 Bits.append(ID.Bits.begin(), ID.Bits.end()); in AddNodeID() 109 return *this == FoldingSetNodeIDRef(RHS.Bits.data(), RHS.Bits.size()); in operator ==() 115 return FoldingSetNodeIDRef(Bits.data(), Bits.size()) == RHS; in operator ==() 121 return *this < FoldingSetNodeIDRef(RHS.Bits.data(), RHS.Bits.size()); in operator <() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/Utils/ |
| H A D | AArch64BaseInfo.cpp | 158 uint32_t Bits; in parseGenericRegister() local 164 Bits = (Op0 << 14) | (Op1 << 11) | (CRn << 7) | (CRm << 3) | Op2; in parseGenericRegister() 166 return Bits; in parseGenericRegister() 169 std::string AArch64SysReg::genericRegisterString(uint32_t Bits) { in genericRegisterString() argument 170 assert(Bits < 0x10000); in genericRegisterString() 171 uint32_t Op0 = (Bits >> 14) & 0x3; in genericRegisterString() 172 uint32_t Op1 = (Bits >> 11) & 0x7; in genericRegisterString() 173 uint32_t CRn = (Bits >> 7) & 0xf; in genericRegisterString() 174 uint32_t CRm = (Bits >> 3) & 0xf; in genericRegisterString() 175 uint32_t Op2 = Bits & 0x7; in genericRegisterString()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/ |
| H A D | RISCVOptWInstrs.cpp | 94 unsigned Bits) { in vectorPseudoHasAllNBitUsers() argument 113 return NumDemandedBits && Bits >= *NumDemandedBits; in vectorPseudoHasAllNBitUsers() 131 unsigned Bits = P.second; in hasAllNBitUsers() local 150 if (vectorPseudoHasAllNBitUsers(UserOp, Bits)) in hasAllNBitUsers() 187 if (Bits >= 32) in hasAllNBitUsers() 193 if (Bits >= 8) in hasAllNBitUsers() 201 if (Bits >= 16) in hasAllNBitUsers() 206 if (Bits >= (ST.getXLen() / 2)) in hasAllNBitUsers() 215 if (Bits > ShAmt) { in hasAllNBitUsers() 216 Worklist.emplace_back(UserMI, Bits - ShAmt); in hasAllNBitUsers() [all …]
|
| /freebsd/contrib/llvm-project/clang/include/clang/Basic/ |
| H A D | DiagnosticOptions.h | 92 #define DIAGOPT(Name, Bits, Default) unsigned Name : Bits; argument 93 #define ENUM_DIAGOPT(Name, Type, Bits, Default) argument 99 #define DIAGOPT(Name, Bits, Default) argument 100 #define ENUM_DIAGOPT(Name, Type, Bits, Default) unsigned Name : Bits; argument 135 #define DIAGOPT(Name, Bits, Default) argument 136 #define ENUM_DIAGOPT(Name, Type, Bits, Default) \ argument 142 #define DIAGOPT(Name, Bits, Default) Name = Default; in DiagnosticOptions() argument 143 #define ENUM_DIAGOPT(Name, Type, Bits, Default) set##Name(Default); in DiagnosticOptions() argument
|
| /freebsd/contrib/llvm-project/clang/lib/Basic/ |
| H A D | CodeGenOptions.cpp | 14 #define CODEGENOPT(Name, Bits, Default, Compatibility) Name = Default; in CodeGenOptions() argument 15 #define ENUM_CODEGENOPT(Name, Type, Bits, Default, Compatibility) \ in CodeGenOptions() argument 27 #define CODEGENOPT(Name, Bits, Default, Compatibility) \ in resetNonModularOptions() argument 30 #define ENUM_CODEGENOPT(Name, Type, Bits, Default, Compatibility) \ in resetNonModularOptions() argument 38 #define DEBUGOPT(Name, Bits, Default, Compatibility) \ in resetNonModularOptions() argument 41 #define VALUE_DEBUGOPT(Name, Bits, Default, Compatibility) \ in resetNonModularOptions() argument 44 #define ENUM_DEBUGOPT(Name, Type, Bits, Default, Compatibility) \ in resetNonModularOptions() argument
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/LoongArch/ |
| H A D | LoongArchOptWInstrs.cpp | 110 unsigned Bits = P.second; in hasAllNBitUsers() local 168 if (Bits >= 32) in hasAllNBitUsers() 177 if (Bits >= 32 && ST.hasDiv32()) in hasAllNBitUsers() 183 if (Bits >= 1) in hasAllNBitUsers() 188 if (Bits >= 2) in hasAllNBitUsers() 193 if (Bits >= 3) in hasAllNBitUsers() 198 if (Bits >= 4) in hasAllNBitUsers() 205 if (Bits >= 8) in hasAllNBitUsers() 212 if (Bits >= 16) in hasAllNBitUsers() 221 if (Bits > ShAmt) { in hasAllNBitUsers() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/MC/ |
| H A D | MCSubtargetInfo.cpp | 38 void SetImpliedBits(FeatureBitset &Bits, const FeatureBitset &Implies, in SetImpliedBits() argument 42 Bits |= Implies; in SetImpliedBits() 45 SetImpliedBits(Bits, FE.Implies.getAsBitset(), FeatureTable); in SetImpliedBits() 50 void ClearImpliedBits(FeatureBitset &Bits, unsigned Value, in ClearImpliedBits() argument 54 Bits.reset(FE.Value); in ClearImpliedBits() 55 ClearImpliedBits(Bits, FE.Value, FeatureTable); in ClearImpliedBits() 60 static void ApplyFeatureFlag(FeatureBitset &Bits, StringRef Feature, in ApplyFeatureFlag() argument 72 Bits.set(FeatureEntry->Value); in ApplyFeatureFlag() 75 SetImpliedBits(Bits, FeatureEntry->Implies.getAsBitset(), FeatureTable); in ApplyFeatureFlag() 77 Bits.reset(FeatureEntry->Value); in ApplyFeatureFlag() [all …]
|
| /freebsd/contrib/llvm-project/clang/include/clang/AST/ |
| H A D | TemplateName.h | 74 struct BitsTag Bits; member 79 Bits.Kind = Kind; in UncommonTemplateNameStorage() 80 Bits.Index = Index; in UncommonTemplateNameStorage() 81 Bits.Data = Data; in UncommonTemplateNameStorage() 86 return Bits.Kind == Overloaded in getAsOverloadedStorage() 92 return Bits.Kind == Assumed in getAsAssumedTemplateName() 98 return Bits.Kind == Deduced in getAsDeducedTemplateName() 104 return Bits.Kind == SubstTemplateTemplateParm in getAsSubstTemplateTemplateParm() 110 return Bits.Kind == SubstTemplateTemplateParmPack in getAsSubstTemplateTemplateParmPack() 132 unsigned size() const { return Bits.Data; } in size() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | StackLifetime.h | 64 BitVector Bits; variable 69 LiveRange(unsigned Size, bool Set = false) : Bits(Size, Set) {} in Bits() function 70 void addRange(unsigned Start, unsigned End) { Bits.set(Start, End); } in addRange() 73 return Bits.anyCommon(Other.Bits); in overlaps() 76 void join(const LiveRange &Other) { Bits |= Other.Bits; } in join() 78 bool test(unsigned Idx) const { return Bits.test(Idx); } in test() 180 return OS << R.Bits;
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ |
| H A D | WholeProgramDevirt.h | 110 VTableBits *Bits; member 116 return std::tie(Bits, Offset) < std::tie(other.Bits, other.Offset); 156 uint64_t minAfterBytes() const { return TM->Bits->ObjectSize - TM->Offset; } in minAfterBytes() 161 return minBeforeBytes() + TM->Bits->Before.Bytes.size(); in allocatedBeforeBytes() 167 return minAfterBytes() + TM->Bits->After.Bytes.size(); in allocatedAfterBytes() 173 TM->Bits->Before.setBit(Pos - 8 * minBeforeBytes(), RetVal); in setBeforeBit() 179 TM->Bits->After.setBit(Pos - 8 * minAfterBytes(), RetVal); in setAfterBit() 188 TM->Bits->Before.setLE(Pos - 8 * minBeforeBytes(), RetVal, Size); in setBeforeBytes() 190 TM->Bits->Before.setBE(Pos - 8 * minBeforeBytes(), RetVal, Size); in setBeforeBytes() 197 TM->Bits->After.setBE(Pos - 8 * minAfterBytes(), RetVal, Size); in setAfterBytes() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
| H A D | X86FixupVectorConstants.cpp | 106 if (std::optional<APInt> Bits = extractConstantBits(CVSplat)) { in extractConstantBits() local 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() local 120 Bits.insertBits(*SubBits, I * SubBits->getBitWidth()); in extractConstantBits() 122 return Bits; in extractConstantBits() 132 APInt Bits = APInt::getZero(NumBits); in extractConstantBits() local 136 Bits.insertBits(CDS->getElementAsAPInt(I), I * EltBits); in extractConstantBits() 138 Bits.insertBits(CDS->getElementAsAPFloat(I).bitcastToAPInt(), in extractConstantBits() 141 return Bits; in extractConstantBits() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/AST/ |
| H A D | Linkage.h | 69 unsigned Bits = 0; in toBits() local 70 Bits = (Bits << 1) | ExplicitKind; in toBits() 71 Bits = (Bits << 1) | IgnoreExplicitVisibility; in toBits() 72 Bits = (Bits << 1) | IgnoreAllVisibility; in toBits() 73 return Bits; in toBits()
|