LLVM 22.0.0git
llvm::FeatureBitset Class Reference

Container class for subtarget features. More...

#include "llvm/TargetParser/SubtargetFeature.h"

Inheritance diagram for llvm::FeatureBitset:
[legend]

Public Member Functions

constexpr FeatureBitset ()=default
constexpr FeatureBitset (std::initializer_list< unsigned > Init)
FeatureBitsetset ()
constexpr FeatureBitsetset (unsigned I)
constexpr FeatureBitsetreset (unsigned I)
constexpr FeatureBitsetflip (unsigned I)
constexpr bool operator[] (unsigned I) const
constexpr bool test (unsigned I) const
constexpr size_t size () const
bool any () const
bool none () const
size_t count () const
constexpr FeatureBitsetoperator^= (const FeatureBitset &RHS)
constexpr FeatureBitset operator^ (const FeatureBitset &RHS) const
constexpr FeatureBitsetoperator&= (const FeatureBitset &RHS)
constexpr FeatureBitset operator& (const FeatureBitset &RHS) const
constexpr FeatureBitsetoperator|= (const FeatureBitset &RHS)
constexpr FeatureBitset operator| (const FeatureBitset &RHS) const
constexpr FeatureBitset operator~ () const
bool operator== (const FeatureBitset &RHS) const
bool operator!= (const FeatureBitset &RHS) const
bool operator< (const FeatureBitset &Other) const

Protected Member Functions

constexpr FeatureBitset (const std::array< uint64_t, MAX_SUBTARGET_WORDS > &B)

Detailed Description

Container class for subtarget features.

This is a constexpr reimplementation of a subset of std::bitset. It would be nice to use std::bitset directly, but it doesn't support constant initialization.

Definition at line 42 of file SubtargetFeature.h.

Constructor & Destructor Documentation

◆ FeatureBitset() [1/3]

◆ FeatureBitset() [2/3]

llvm::FeatureBitset::FeatureBitset ( )
constexprdefault

◆ FeatureBitset() [3/3]

llvm::FeatureBitset::FeatureBitset ( std::initializer_list< unsigned > Init)
inlineconstexpr

Definition at line 53 of file SubtargetFeature.h.

References I, and set().

Member Function Documentation

◆ any()

bool llvm::FeatureBitset::any ( ) const
inline

Definition at line 87 of file SubtargetFeature.h.

References llvm::any_of(), and I.

Referenced by getImpliedEnabledFeatures(), and none().

◆ count()

size_t llvm::FeatureBitset::count ( ) const
inline

Definition at line 91 of file SubtargetFeature.h.

References B(), llvm::Count, and llvm::popcount().

◆ flip()

FeatureBitset & llvm::FeatureBitset::flip ( unsigned I)
inlineconstexpr

Definition at line 73 of file SubtargetFeature.h.

References FeatureBitset(), and I.

Referenced by llvm::MCSubtargetInfo::ToggleFeature().

◆ none()

bool llvm::FeatureBitset::none ( ) const
inline

Definition at line 90 of file SubtargetFeature.h.

References any().

◆ operator!=()

bool llvm::FeatureBitset::operator!= ( const FeatureBitset & RHS) const
inline

Definition at line 144 of file SubtargetFeature.h.

References FeatureBitset(), and RHS.

◆ operator&()

FeatureBitset llvm::FeatureBitset::operator& ( const FeatureBitset & RHS) const
inlineconstexpr

Definition at line 115 of file SubtargetFeature.h.

References FeatureBitset(), and RHS.

◆ operator&=()

FeatureBitset & llvm::FeatureBitset::operator&= ( const FeatureBitset & RHS)
inlineconstexpr

Definition at line 110 of file SubtargetFeature.h.

References E(), FeatureBitset(), I, and RHS.

◆ operator<()

bool llvm::FeatureBitset::operator< ( const FeatureBitset & Other) const
inline

Definition at line 146 of file SubtargetFeature.h.

References E(), FeatureBitset(), I, LHS, llvm::Other, RHS, size(), and test.

◆ operator==()

bool llvm::FeatureBitset::operator== ( const FeatureBitset & RHS) const
inline

Definition at line 140 of file SubtargetFeature.h.

References FeatureBitset(), and RHS.

◆ operator[]()

bool llvm::FeatureBitset::operator[] ( unsigned I) const
inlineconstexpr

Definition at line 78 of file SubtargetFeature.h.

References I.

◆ operator^()

FeatureBitset llvm::FeatureBitset::operator^ ( const FeatureBitset & RHS) const
inlineconstexpr

Definition at line 104 of file SubtargetFeature.h.

References FeatureBitset(), and RHS.

◆ operator^=()

FeatureBitset & llvm::FeatureBitset::operator^= ( const FeatureBitset & RHS)
inlineconstexpr

Definition at line 98 of file SubtargetFeature.h.

References E(), FeatureBitset(), I, and RHS.

◆ operator|()

FeatureBitset llvm::FeatureBitset::operator| ( const FeatureBitset & RHS) const
inlineconstexpr

Definition at line 127 of file SubtargetFeature.h.

References FeatureBitset(), and RHS.

◆ operator|=()

FeatureBitset & llvm::FeatureBitset::operator|= ( const FeatureBitset & RHS)
inlineconstexpr

Definition at line 121 of file SubtargetFeature.h.

References E(), FeatureBitset(), I, and RHS.

◆ operator~()

FeatureBitset llvm::FeatureBitset::operator~ ( ) const
inlineconstexpr

Definition at line 133 of file SubtargetFeature.h.

References B(), and FeatureBitset().

◆ reset()

FeatureBitset & llvm::FeatureBitset::reset ( unsigned I)
inlineconstexpr

◆ set() [1/2]

◆ set() [2/2]

FeatureBitset & llvm::FeatureBitset::set ( unsigned I)
inlineconstexpr

Definition at line 63 of file SubtargetFeature.h.

References FeatureBitset(), and I.

◆ size()

size_t llvm::FeatureBitset::size ( ) const
inlineconstexpr

◆ test()


The documentation for this class was generated from the following file: