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 (StringRef Feature) |
static std::string | StripFlag (StringRef Feature) |
static bool | isEnabled (StringRef Feature) |
static void | Split (std::vector< std::string > &V, StringRef S) |
static std::string | Join (const std::vector< std::string > &V) |
static const SubtargetFeatureKV * | Find (StringRef S, ArrayRef< SubtargetFeatureKV > A) |
Find KV in array using binary search. | |
static size_t | getLongestEntryLength (ArrayRef< SubtargetFeatureKV > Table) |
static void | Help (ArrayRef< SubtargetFeatureKV > CPUTable, ArrayRef< SubtargetFeatureKV > FeatTable) |
static void | SetImpliedBits (uint64_t &Bits, const SubtargetFeatureKV *FeatureEntry, ArrayRef< SubtargetFeatureKV > FeatureTable) |
static void | ClearImpliedBits (uint64_t &Bits, const SubtargetFeatureKV *FeatureEntry, ArrayRef< SubtargetFeatureKV > FeatureTable) |
static void ClearImpliedBits | ( | uint64_t & | Bits, |
const SubtargetFeatureKV * | FeatureEntry, | ||
ArrayRef< SubtargetFeatureKV > | FeatureTable | ||
) | [static] |
ClearImpliedBits - For each feature that (transitively) implies this feature, clear it.
Definition at line 169 of file SubtargetFeature.cpp.
References llvm::SubtargetFeatureKV::Value.
Referenced by llvm::SubtargetFeatures::getFeatureBits(), and llvm::SubtargetFeatures::ToggleFeature().
static const SubtargetFeatureKV* Find | ( | StringRef | S, |
ArrayRef< SubtargetFeatureKV > | A | ||
) | [static] |
Find KV in array using binary search.
Definition at line 92 of file SubtargetFeature.cpp.
References llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::end(), and F().
Referenced by llvm::SubtargetFeatures::getFeatureBits(), and llvm::SubtargetFeatures::ToggleFeature().
static size_t getLongestEntryLength | ( | ArrayRef< SubtargetFeatureKV > | Table | ) | [static] |
getLongestEntryLength - Return the length of the longest entry in the table.
Definition at line 104 of file SubtargetFeature.cpp.
References I, and 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 llvm::SubtargetFeatures::AddFeature(), and StripFlag().
static void Help | ( | ArrayRef< SubtargetFeatureKV > | CPUTable, |
ArrayRef< SubtargetFeatureKV > | FeatTable | ||
) | [static] |
Display help for feature choices.
Definition at line 113 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().
Join a vector of strings to a string with a comma separating each element.
Definition at line 64 of file SubtargetFeature.cpp.
Referenced by llvm::SubtargetFeatures::getString().
static void SetImpliedBits | ( | uint64_t & | Bits, |
const SubtargetFeatureKV * | FeatureEntry, | ||
ArrayRef< SubtargetFeatureKV > | FeatureTable | ||
) | [static] |
SetImpliedBits - For each feature that is (transitively) implied by this feature, set it.
Definition at line 153 of file SubtargetFeature.cpp.
References llvm::SubtargetFeatureKV::Implies, and llvm::SubtargetFeatureKV::Value.
Referenced by llvm::SubtargetFeatures::getFeatureBits(), and llvm::SubtargetFeatures::ToggleFeature().
Split - Splits a string of comma separated items in to a vector of strings.
Definition at line 56 of file SubtargetFeature.cpp.
References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), and llvm::StringRef::split().
Referenced by HandleCallsInBlockInlinedThroughInvoke(), printHelpStr(), split(), llvm::Regex::sub(), and llvm::SubtargetFeatures::SubtargetFeatures().
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().