LLVM
8.0.1
|
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstring>
#include <iterator>
#include <string>
#include <vector>
Go to the source code of this file.
Functions | |
static bool | hasFlag (StringRef Feature) |
Determine if a feature has a flag; '+' or '-'. More... | |
static std::string | StripFlag (StringRef Feature) |
Return string stripped of flag. More... | |
static bool | isEnabled (StringRef Feature) |
Return true if enable flag; '+'. More... | |
static void | Split (std::vector< std::string > &V, StringRef S) |
Splits a string of comma separated items in to a vector of strings. More... | |
static const SubtargetFeatureKV * | Find (StringRef S, ArrayRef< SubtargetFeatureKV > A) |
Find KV in array using binary search. More... | |
static size_t | getLongestEntryLength (ArrayRef< SubtargetFeatureKV > Table) |
Return the length of the longest entry in the table. More... | |
static void | Help (ArrayRef< SubtargetFeatureKV > CPUTable, ArrayRef< SubtargetFeatureKV > FeatTable) |
Display help for feature choices. More... | |
static void | SetImpliedBits (FeatureBitset &Bits, const SubtargetFeatureKV &FeatureEntry, ArrayRef< SubtargetFeatureKV > FeatureTable) |
For each feature that is (transitively) implied by this feature, set it. More... | |
static void | ClearImpliedBits (FeatureBitset &Bits, const SubtargetFeatureKV &FeatureEntry, ArrayRef< SubtargetFeatureKV > FeatureTable) |
For each feature that (transitively) implies this feature, clear it. More... | |
|
static |
For each feature that (transitively) implies this feature, clear it.
Definition at line 140 of file SubtargetFeature.cpp.
References llvm::SubtargetFeatureKV::Value.
Referenced by llvm::SubtargetFeatures::ApplyFeatureFlag(), and llvm::SubtargetFeatures::ToggleFeature().
|
static |
Find KV in array using binary search.
Definition at line 74 of file SubtargetFeature.cpp.
References llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::end(), F(), and llvm::lower_bound().
Referenced by llvm::fuzzerop::anyAggregateType(), llvm::SubtargetFeatures::ApplyFeatureFlag(), llvm::createSeparateConstOffsetFromGEPPass(), llvm::SubtargetFeatures::getFeatureBits(), and llvm::SubtargetFeatures::ToggleFeature().
|
static |
Return the length of the longest entry in the table.
Definition at line 85 of file SubtargetFeature.cpp.
References I, and llvm::max().
Referenced by Help().
Determine if a feature has a flag; '+' or '-'.
Definition at line 36 of file SubtargetFeature.cpp.
References assert(), and llvm::StringRef::empty().
Referenced by llvm::SubtargetFeatures::AddFeature(), llvm::SubtargetFeatures::ApplyFeatureFlag(), llvm::opt::ArgList::getLastArgNoClaim(), and StripFlag().
|
static |
Display help for feature choices.
Definition at line 93 of file SubtargetFeature.cpp.
References llvm::errs(), llvm::format(), and getLongestEntryLength().
Referenced by llvm::SubtargetFeatures::getFeatureBits().
Return true if enable flag; '+'.
Definition at line 50 of file SubtargetFeature.cpp.
References assert(), and llvm::StringRef::empty().
Referenced by llvm::SubtargetFeatures::ApplyFeatureFlag(), llvm::OptimizationRemark::classof(), llvm::OptimizationRemarkMissed::classof(), llvm::OptimizationRemarkAnalysis::classof(), llvm::DiagnosticInfoOptimizationFailure::classof(), and llvm::DiagnosticInfoOptimizationBase::DiagnosticInfoOptimizationBase().
|
static |
For each feature that is (transitively) implied by this feature, set it.
Definition at line 126 of file SubtargetFeature.cpp.
References llvm::SubtargetFeatureKV::Implies, and llvm::SubtargetFeatureKV::Value.
Referenced by llvm::SubtargetFeatures::ApplyFeatureFlag(), llvm::SubtargetFeatures::getFeatureBits(), and llvm::SubtargetFeatures::ToggleFeature().
|
static |
Splits a string of comma separated items in to a vector of strings.
Definition at line 59 of file SubtargetFeature.cpp.
References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), and llvm::StringRef::split().
Referenced by llvm::changeToInvokeAndSplitBasicBlock(), llvm::createBlockExtractorPass(), llvm::createScalarizerPass(), FindFirstNonCommonLetter(), llvm::RecordStreamer::flushSymverDirectives(), getAddrSpace(), getConstVector(), getPermuteMask(), getSelectsInScope(), llvm::AArch64CallLowering::lowerFormalArguments(), matchVectorShuffleAsVPMOV(), performSTORECombine(), llvm::cl::Option::printHelpStr(), replaceShuffleOfInsert(), split(), llvm::Regex::sub(), and llvm::SubtargetFeatures::SubtargetFeatures().
|
inlinestatic |
Return string stripped of flag.
Definition at line 45 of file SubtargetFeature.cpp.
References hasFlag(), and llvm::StringRef::substr().
Referenced by llvm::SubtargetFeatures::ApplyFeatureFlag(), and llvm::SubtargetFeatures::ToggleFeature().