LLVM 20.0.0git
Public Member Functions | Protected Member Functions | List of all members
llvm::FeatureBitset Class Reference

Container class for subtarget features. More...

#include "llvm/TargetParser/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 41 of file SubtargetFeature.h.

Constructor & Destructor Documentation

◆ FeatureBitset() [1/3]

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

Definition at line 47 of file SubtargetFeature.h.

◆ FeatureBitset() [2/3]

constexpr llvm::FeatureBitset::FeatureBitset ( )
constexprdefault

◆ FeatureBitset() [3/3]

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

Definition at line 52 of file SubtargetFeature.h.

References I, and set().

Member Function Documentation

◆ any()

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

Definition at line 86 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 90 of file SubtargetFeature.h.

References B, and llvm::popcount().

◆ flip()

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

Definition at line 72 of file SubtargetFeature.h.

References I.

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

◆ none()

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

Definition at line 89 of file SubtargetFeature.h.

References any().

Referenced by llvm::RISCVSysReg::SysReg::haveRequiredFeatures().

◆ operator!=()

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

Definition at line 143 of file SubtargetFeature.h.

References RHS.

◆ operator&()

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

Definition at line 114 of file SubtargetFeature.h.

References RHS.

◆ operator&=()

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

Definition at line 109 of file SubtargetFeature.h.

References E, I, and RHS.

◆ operator<()

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

Definition at line 145 of file SubtargetFeature.h.

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

◆ operator==()

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

Definition at line 139 of file SubtargetFeature.h.

References RHS.

◆ operator[]()

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

Definition at line 77 of file SubtargetFeature.h.

References I.

◆ operator^()

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

Definition at line 103 of file SubtargetFeature.h.

References RHS.

◆ operator^=()

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

Definition at line 97 of file SubtargetFeature.h.

References E, I, and RHS.

◆ operator|()

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

Definition at line 126 of file SubtargetFeature.h.

References RHS.

◆ operator|=()

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

Definition at line 120 of file SubtargetFeature.h.

References E, I, and RHS.

◆ operator~()

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

Definition at line 132 of file SubtargetFeature.h.

References B.

◆ reset()

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

◆ set() [1/2]

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

◆ set() [2/2]

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

Definition at line 62 of file SubtargetFeature.h.

References I.

◆ size()

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

◆ test()

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

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