class SubtargetFeatures
Declaration
class SubtargetFeatures { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:183
Method Overview
- public void AddFeature(llvm::StringRef String, bool Enable = true)
- public static void Split(std::vector<std::string> & V, llvm::StringRef S)
- public static std::string StripFlag(llvm::StringRef Feature)
- public SubtargetFeatures(llvm::StringRef Initial = "")
- public void dump() const
- public void getDefaultSubtargetFeatures(const llvm::Triple & Triple)
- public const std::vector<std::string> & getFeatures() const
- public std::string getString() const
- public static bool hasFlag(llvm::StringRef Feature)
- public static inline bool isEnabled(llvm::StringRef Feature)
- public void print(llvm::raw_ostream & OS) const
Methods
¶void AddFeature(llvm::StringRef String,
bool Enable = true)
void AddFeature(llvm::StringRef String,
bool Enable = true)
Description
Adds Features.
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:193
Parameters
- llvm::StringRef String
- bool Enable = true
¶static void Split(std::vector<std::string>& V,
llvm::StringRef S)
static void Split(std::vector<std::string>& V,
llvm::StringRef S)
Description
Splits a string of comma separated items in to a vector of strings.
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:231
Parameters
- std::vector<std::string>& V
- llvm::StringRef S
¶static std::string StripFlag(
llvm::StringRef Feature)
static std::string StripFlag(
llvm::StringRef Feature)
Description
Return string stripped of flag.
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:217
Parameters
- llvm::StringRef Feature
¶SubtargetFeatures(llvm::StringRef Initial = "")
SubtargetFeatures(llvm::StringRef Initial = "")
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:187
Parameters
- llvm::StringRef Initial = ""
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:202
¶void getDefaultSubtargetFeatures(
const llvm::Triple& Triple)
void getDefaultSubtargetFeatures(
const llvm::Triple& Triple)
Description
Adds the default features for the specified target triple.
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:205
Parameters
- const llvm::Triple& Triple
¶const std::vector<std::string>& getFeatures()
const
const std::vector<std::string>& getFeatures()
const
Description
Returns the vector of individual subtarget features.
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:196
¶std::string getString() const
std::string getString() const
Description
Returns features as a string.
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:190
¶static bool hasFlag(llvm::StringRef Feature)
static bool hasFlag(llvm::StringRef Feature)
Description
Determine if a feature has a flag; '+' or '-'
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:208
Parameters
- llvm::StringRef Feature
¶static inline bool isEnabled(
llvm::StringRef Feature)
static inline bool isEnabled(
llvm::StringRef Feature)
Description
Return true if enable flag; '+'.
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:222
Parameters
- llvm::StringRef Feature
¶void print(llvm::raw_ostream& OS) const
void print(llvm::raw_ostream& OS) const
Description
Prints feature string.
Declared at: llvm/include/llvm/MC/SubtargetFeature.h:199