18 #ifndef LLVM_MC_SUBTARGETFEATURE_H
19 #define LLVM_MC_SUBTARGETFEATURE_H
23 #include <initializer_list>
29 template <
typename T>
class ArrayRef;
94 std::vector<std::string> Features;
130 #endif // LLVM_MC_SUBTARGETFEATURE_H
const unsigned MAX_SUBTARGET_FEATURES
void getDefaultSubtargetFeatures(const Triple &Triple)
Adds the default features for the specified target triple.
bool operator<(StringRef S) const
Compare routine for std::lower_bound.
const char * Key
K-V key string.
Used to provide key value pairs for CPU and arbitrary pointers.
void AddFeature(StringRef String, bool Enable=true)
Adds Features.
FeatureBitset Value
K-V integer value.
Used to provide key value pairs for feature and CPU bit flags.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Container class for subtarget features.
const char * Key
K-V key string.
const void * Value
K-V pointer value.
std::string getString() const
Returns features as a string.
static void ToggleFeature(FeatureBitset &Bits, StringRef String, ArrayRef< SubtargetFeatureKV > FeatureTable)
Toggles a feature and update the feature bits.
Triple - Helper class for working with autoconf configuration names.
bool operator<(StringRef S) const
Compare routine for std::lower_bound.
const char * Desc
Help descriptor.
FeatureBitset(const bitset< MAX_SUBTARGET_FEATURES > &B)
SubtargetFeatures(StringRef Initial="")
Manages the enabling and disabling of subtarget specific features.
FeatureBitset(std::initializer_list< unsigned > Init)
static void ApplyFeatureFlag(FeatureBitset &Bits, StringRef Feature, ArrayRef< SubtargetFeatureKV > FeatureTable)
Applies the feature flag and update the feature bits.
void print(raw_ostream &OS) const
Prints feature string.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
FeatureBitset Implies
K-V bit mask.
FeatureBitset getFeatureBits(StringRef CPU, ArrayRef< SubtargetFeatureKV > CPUTable, ArrayRef< SubtargetFeatureKV > FeatureTable)
Returns feature bits of a CPU.
bool operator<(const SubtargetFeatureKV &Other) const
Compare routine for std::is_sorted.