LLVM  10.0.0svn
Public Member Functions | Protected Member Functions | List of all members
llvm::FeatureBitset Class Reference

Container class for subtarget features. More...

#include "llvm/MC/SubtargetFeature.h"

Inheritance diagram for llvm::FeatureBitset:
Inheritance graph
[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 40 of file SubtargetFeature.h.

Constructor & Destructor Documentation

◆ FeatureBitset() [1/3]

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

Definition at line 47 of file SubtargetFeature.h.

References FeatureBitset(), and I.

◆ FeatureBitset() [2/3]

constexpr llvm::FeatureBitset::FeatureBitset ( )
default

Referenced by FeatureBitset().

◆ FeatureBitset() [3/3]

constexpr llvm::FeatureBitset::FeatureBitset ( std::initializer_list< unsigned Init)
inline

Definition at line 54 of file SubtargetFeature.h.

References I.

Member Function Documentation

◆ any()

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

Definition at line 94 of file SubtargetFeature.h.

References llvm::any_of(), and I.

Referenced by isMatchingOrAlias(), none(), and printMCExpr().

◆ count()

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

Definition at line 98 of file SubtargetFeature.h.

References B, and llvm::countPopulation().

◆ flip()

constexpr FeatureBitset& llvm::FeatureBitset::flip ( unsigned  I)
inline

Definition at line 78 of file SubtargetFeature.h.

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

◆ none()

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

◆ operator &()

constexpr FeatureBitset llvm::FeatureBitset::operator& ( const FeatureBitset RHS) const
inline

Definition at line 123 of file SubtargetFeature.h.

◆ operator &=()

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

Definition at line 117 of file SubtargetFeature.h.

References llvm::array_lengthof(), E, and I.

◆ operator!=()

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

Definition at line 152 of file SubtargetFeature.h.

◆ operator<()

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

Definition at line 154 of file SubtargetFeature.h.

References E, I, size(), and test().

◆ operator==()

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

◆ operator[]()

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

Definition at line 85 of file SubtargetFeature.h.

References llvm::BitmaskEnumDetail::Mask().

◆ operator^()

constexpr FeatureBitset llvm::FeatureBitset::operator^ ( const FeatureBitset RHS) const
inline

Definition at line 111 of file SubtargetFeature.h.

◆ operator^=()

constexpr FeatureBitset& llvm::FeatureBitset::operator^= ( const FeatureBitset RHS)
inline

Definition at line 105 of file SubtargetFeature.h.

References llvm::array_lengthof(), E, and I.

◆ operator|()

constexpr FeatureBitset llvm::FeatureBitset::operator| ( const FeatureBitset RHS) const
inline

Definition at line 135 of file SubtargetFeature.h.

◆ operator|=()

constexpr FeatureBitset& llvm::FeatureBitset::operator|= ( const FeatureBitset RHS)
inline

Definition at line 129 of file SubtargetFeature.h.

References llvm::array_lengthof(), E, and I.

◆ operator~()

constexpr FeatureBitset llvm::FeatureBitset::operator~ ( ) const
inline

Definition at line 141 of file SubtargetFeature.h.

References B.

◆ reset()

constexpr FeatureBitset& llvm::FeatureBitset::reset ( unsigned  I)
inline

◆ set() [1/2]

FeatureBitset& llvm::FeatureBitset::set ( )
inline

◆ set() [2/2]

constexpr FeatureBitset& llvm::FeatureBitset::set ( unsigned  I)
inline

Definition at line 64 of file SubtargetFeature.h.

References I.

◆ size()

constexpr size_t llvm::FeatureBitset::size ( ) const
inline

◆ test()

constexpr bool llvm::FeatureBitset::test ( unsigned  I) const
inline

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