LLVM: llvm::SubtargetFeatures Class Reference (original) (raw)

Manages the enabling and disabling of subtarget specific features. More...

#include "[llvm/TargetParser/SubtargetFeature.h](SubtargetFeature%5F8h%5Fsource.html)"

Public Member Functions
LLVM_ABI SubtargetFeatures (StringRef Initial="")
LLVM_ABI std::string getString () const
Returns features as a string.
LLVM_ABI void AddFeature (StringRef String, bool Enable=true)
Adds Features.
LLVM_ABI void addFeaturesVector (const ArrayRef< std::string > OtherFeatures)
const std::vector< std::string > & getFeatures () const
Returns the vector of individual subtarget features.
LLVM_ABI void print (raw_ostream &OS) const
Prints feature string.
LLVM_ABI void dump () const
LLVM_ABI void getDefaultSubtargetFeatures (const Triple &Triple)
Adds the default features for the specified target triple.
Static Public Member Functions
static bool hasFlag (StringRef Feature)
Determine if a feature has a flag; '+' or '-'.
static StringRef StripFlag (StringRef Feature)
Return string stripped of flag.
static bool isEnabled (StringRef Feature)
Return true if enable flag; '+'.
static LLVM_ABI void Split (std::vector< std::string > &V, StringRef S)
Splits a string of comma separated items in to a vector of strings.

Manages the enabling and disabling of subtarget specific features.

Features are encoded as a string of the form "+attr1,+attr2,-attr3,...,+attrN" A comma separates each feature from the next (all lowercase.) Each of the remaining features is prefixed with + or - indicating whether that feature should be enabled or disabled contrary to the cpu specification.

Definition at line 175 of file SubtargetFeature.h.

SubtargetFeatures::SubtargetFeatures ( StringRef Initial = "") explicit

AddFeature()

void SubtargetFeatures::AddFeature ( StringRef String,
bool Enable = true )

addFeaturesVector()

void SubtargetFeatures::addFeaturesVector ( const ArrayRef< std::string > OtherFeatures )

dump()

getDefaultSubtargetFeatures()

void SubtargetFeatures::getDefaultSubtargetFeatures ( const Triple & Triple )

getFeatures()

const std::vector< std::string > & llvm::SubtargetFeatures::getFeatures ( ) const inline

getString()

std::string SubtargetFeatures::getString ( ) const

hasFlag()

bool llvm::SubtargetFeatures::hasFlag ( StringRef Feature) inlinestatic

isEnabled()

bool llvm::SubtargetFeatures::isEnabled ( StringRef Feature) inlinestatic

print()

void SubtargetFeatures::print ( raw_ostream & OS ) const

Split()

void SubtargetFeatures::Split ( std::vector< std::string > & V, StringRef S ) static

StripFlag()


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