LLVM API Documentation
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdlib>
Go to the source code of this file.
Functions | |
static bool | hasFlag (const StringRef Feature) |
static std::string | StripFlag (const StringRef Feature) |
static bool | isEnabled (const StringRef Feature) |
static std::string | PrependFlag (const StringRef Feature, bool IsEnabled) |
static void | Split (std::vector< std::string > &V, const StringRef S) |
static std::string | Join (const std::vector< std::string > &V) |
static const SubtargetFeatureKV * | Find (StringRef S, const SubtargetFeatureKV *A, size_t L) |
Find KV in array using binary search. More... | |
static size_t | getLongestEntryLength (const SubtargetFeatureKV *Table, size_t Size) |
static void | Help (const SubtargetFeatureKV *CPUTable, size_t CPUTableSize, const SubtargetFeatureKV *FeatTable, size_t FeatTableSize) |
static void | SetImpliedBits (uint64_t &Bits, const SubtargetFeatureKV *FeatureEntry, const SubtargetFeatureKV *FeatureTable, size_t FeatureTableSize) |
static void | ClearImpliedBits (uint64_t &Bits, const SubtargetFeatureKV *FeatureEntry, const SubtargetFeatureKV *FeatureTable, size_t FeatureTableSize) |
|
static |
ClearImpliedBits - For each feature that (transitively) implies this feature, clear it.
Definition at line 208 of file SubtargetFeature.cpp.
References llvm::SubtargetFeatureKV::Implies, and llvm::SubtargetFeatureKV::Value.
Referenced by llvm::SubtargetFeatures::getFeatureBits(), and llvm::SubtargetFeatures::ToggleFeature().
|
static |
Find KV in array using binary search.
Definition at line 122 of file SubtargetFeature.cpp.
References F(), llvm::HexagonISD::Hi, and llvm::SubtargetFeatureKV::Key.
Referenced by llvm::SubtargetFeatures::getFeatureBits(), and llvm::SubtargetFeatures::ToggleFeature().
|
static |
getLongestEntryLength - Return the length of the longest entry in the table.
Definition at line 136 of file SubtargetFeature.cpp.
References llvm::LibFunc::strlen.
Referenced by Help().
hasFlag - Determine if a feature has a flag; '+' or '-'
Definition at line 30 of file SubtargetFeature.cpp.
References llvm::StringRef::empty().
Referenced by PrependFlag(), and StripFlag().
|
static |
Display help for feature choices.
Definition at line 146 of file SubtargetFeature.cpp.
References llvm::errs(), llvm::format(), and getLongestEntryLength().
Referenced by llvm::SubtargetFeatures::getFeatureBits().
isEnabled - Return true if enable flag; '+'.
Definition at line 46 of file SubtargetFeature.cpp.
References llvm::StringRef::empty().
Referenced by llvm::SubtargetFeatures::getFeatureBits().
|
static |
Join a vector of strings to a string with a comma separating each element.
Definition at line 92 of file SubtargetFeature.cpp.
Referenced by llvm::SubtargetFeatures::getString().
PrependFlag - Return a string with a prepended flag; '+' or '-'.
Definition at line 56 of file SubtargetFeature.cpp.
References llvm::StringRef::empty(), hasFlag(), and llvm::cl::Prefix.
Referenced by llvm::SubtargetFeatures::AddFeature().
|
static |
SetImpliedBits - For each feature that is (transitively) implied by this feature, set it.
Definition at line 189 of file SubtargetFeature.cpp.
References llvm::SubtargetFeatureKV::Implies, and llvm::SubtargetFeatureKV::Value.
Referenced by llvm::SubtargetFeatures::getFeatureBits(), and llvm::SubtargetFeatures::ToggleFeature().
|
static |
Split - Splits a string of comma separated items in to a vector of strings.
Definition at line 68 of file SubtargetFeature.cpp.
References llvm::StringRef::empty(), llvm::StringRef::find(), and llvm::StringRef::substr().
Referenced by HandleCallsInBlockInlinedThroughInvoke(), printHelpStr(), split(), llvm::Regex::sub(), and llvm::SubtargetFeatures::SubtargetFeatures().
|
inlinestatic |
StripFlag - Return string stripped of flag.
Definition at line 40 of file SubtargetFeature.cpp.
References hasFlag(), and llvm::StringRef::substr().
Referenced by llvm::SubtargetFeatures::getFeatureBits(), and llvm::SubtargetFeatures::ToggleFeature().