LLVM 20.0.0git
|
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/MC/MCInstrItineraries.h"
#include "llvm/MC/MCSchedule.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/SubtargetFeature.h"
#include <algorithm>
#include <cassert>
#include <cstring>
#include <optional>
Go to the source code of this file.
Functions | |
template<typename T > | |
static const T * | Find (StringRef S, ArrayRef< T > A) |
Find KV in array using binary search. | |
static void | SetImpliedBits (FeatureBitset &Bits, const FeatureBitset &Implies, ArrayRef< SubtargetFeatureKV > FeatureTable) |
For each feature that is (transitively) implied by this feature, set it. | |
static void | ClearImpliedBits (FeatureBitset &Bits, unsigned Value, ArrayRef< SubtargetFeatureKV > FeatureTable) |
For each feature that (transitively) implies this feature, clear it. | |
static void | ApplyFeatureFlag (FeatureBitset &Bits, StringRef Feature, ArrayRef< SubtargetFeatureKV > FeatureTable) |
static size_t | getLongestEntryLength (ArrayRef< SubtargetFeatureKV > Table) |
Return the length of the longest entry in the table. | |
static size_t | getLongestEntryLength (ArrayRef< StringRef > Table) |
static void | Help (ArrayRef< StringRef > CPUNames, ArrayRef< SubtargetFeatureKV > FeatTable) |
Display help for feature and mcpu choices. | |
static void | cpuHelp (ArrayRef< StringRef > CPUNames) |
Display help for mcpu choices only. | |
static FeatureBitset | getFeatures (MCSubtargetInfo &STI, StringRef CPU, StringRef TuneCPU, StringRef FS, ArrayRef< StringRef > ProcNames, ArrayRef< SubtargetSubTypeKV > ProcDesc, ArrayRef< SubtargetFeatureKV > ProcFeatures) |
|
static |
Definition at line 59 of file MCSubtargetInfo.cpp.
References assert(), ClearImpliedBits(), llvm::errs(), Find(), llvm::FeatureBitArray::getAsBitset(), llvm::SubtargetFeatures::hasFlag(), llvm::SubtargetFeatureKV::Implies, llvm::SubtargetFeatures::isEnabled(), SetImpliedBits(), llvm::SubtargetFeatures::StripFlag(), and llvm::SubtargetFeatureKV::Value.
Referenced by getFeatures().
|
static |
For each feature that (transitively) implies this feature, clear it.
Definition at line 49 of file MCSubtargetInfo.cpp.
References ClearImpliedBits().
Referenced by ApplyFeatureFlag(), llvm::MCSubtargetInfo::ClearFeatureBitsTransitively(), ClearImpliedBits(), and llvm::MCSubtargetInfo::ToggleFeature().
Display help for mcpu choices only.
Definition at line 142 of file MCSubtargetInfo.cpp.
References llvm::errs().
Referenced by getFeatures().
Find KV in array using binary search.
Definition at line 26 of file MCSubtargetInfo.cpp.
References A, F, and llvm::lower_bound().
Referenced by llvm::fuzzerop::anyAggregateType(), ApplyFeatureFlag(), getFeatures(), llvm::MCSubtargetInfo::getSchedModelForCPU(), llvm::logicalview::LVCodeViewReader::isSystemEntry(), replaceTargetsFromPHINode(), and llvm::MCSubtargetInfo::ToggleFeature().
|
static |
Definition at line 169 of file MCSubtargetInfo.cpp.
References ApplyFeatureFlag(), assert(), cpuHelp(), llvm::ArrayRef< T >::empty(), llvm::StringRef::empty(), llvm::errs(), Find(), llvm::FeatureBitArray::getAsBitset(), llvm::SubtargetFeatures::getFeatures(), Help(), llvm::SubtargetSubTypeKV::Implies, llvm::is_sorted(), SetImpliedBits(), and llvm::SubtargetSubTypeKV::TuneImplies.
Referenced by llvm::MCSubtargetInfo::InitMCProcessorInfo(), and llvm::MCSubtargetInfo::setDefaultFeatures().
Definition at line 95 of file MCSubtargetInfo.cpp.
References I.
|
static |
Return the length of the longest entry in the table.
Definition at line 88 of file MCSubtargetInfo.cpp.
References I.
Referenced by Help().
|
static |
Display help for feature and mcpu choices.
Definition at line 103 of file MCSubtargetInfo.cpp.
References llvm::errs(), llvm::format(), and getLongestEntryLength().
Referenced by llvm::cl::extrahelp::extrahelp(), and getFeatures().
|
static |
For each feature that is (transitively) implied by this feature, set it.
Definition at line 37 of file MCSubtargetInfo.cpp.
References SetImpliedBits(), and llvm::FeatureBitset::test().
Referenced by ApplyFeatureFlag(), getFeatures(), llvm::MCSubtargetInfo::SetFeatureBitsTransitively(), SetImpliedBits(), and llvm::MCSubtargetInfo::ToggleFeature().