class MCSubtargetInfo
Declaration
class MCSubtargetInfo { /* full declaration omitted */ };
Description
Generic base class for all target subtargets.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:74
Method Overview
- public llvm::FeatureBitset ApplyFeatureFlag(llvm::StringRef FS)
- public llvm::FeatureBitset ClearFeatureBitsTransitively(const llvm::FeatureBitset & FB)
- protected void InitMCProcessorInfo(llvm::StringRef CPU, llvm::StringRef FS)
- public MCSubtargetInfo(const llvm::Triple & TT, llvm::StringRef CPU, llvm::StringRef FS, ArrayRef<llvm::SubtargetFeatureKV> PF, ArrayRef<llvm::SubtargetSubTypeKV> PD, const llvm::MCWriteProcResEntry * WPR, const llvm::MCWriteLatencyEntry * WL, const llvm::MCReadAdvanceEntry * RA, const llvm::InstrStage * IS, const unsigned int * OC, const unsigned int * FP)
- public MCSubtargetInfo()
- public MCSubtargetInfo(const llvm::MCSubtargetInfo &)
- public llvm::FeatureBitset SetFeatureBitsTransitively(const llvm::FeatureBitset & FB)
- public llvm::FeatureBitset ToggleFeature(llvm::StringRef FS)
- public llvm::FeatureBitset ToggleFeature(uint64_t FB)
- public llvm::FeatureBitset ToggleFeature(const llvm::FeatureBitset & FB)
- public bool checkFeatures(llvm::StringRef FS) const
- public llvm::StringRef getCPU() const
- public virtual Optional<unsigned int> getCacheAssociativity(unsigned int Level) const
- public virtual Optional<unsigned int> getCacheLineSize(unsigned int Level) const
- public virtual unsigned int getCacheLineSize() const
- public virtual Optional<unsigned int> getCacheSize(unsigned int Level) const
- public const llvm::FeatureBitset & getFeatureBits() const
- public virtual unsigned int getHwMode() const
- public llvm::InstrItineraryData getInstrItineraryForCPU(llvm::StringRef CPU) const
- public virtual unsigned int getMaxPrefetchIterationsAhead() const
- public virtual unsigned int getMinPrefetchStride() const
- public virtual unsigned int getPrefetchDistance() const
- public int getReadAdvanceCycles(const llvm::MCSchedClassDesc * SC, unsigned int UseIdx, unsigned int WriteResID) const
- public ArrayRef<llvm::MCReadAdvanceEntry> getReadAdvanceEntries(const llvm::MCSchedClassDesc & SC) const
- public const llvm::MCSchedModel & getSchedModel() const
- public const llvm::MCSchedModel & getSchedModelForCPU(llvm::StringRef CPU) const
- public const llvm::Triple & getTargetTriple() const
- public const llvm::MCWriteLatencyEntry * getWriteLatencyEntry(const llvm::MCSchedClassDesc * SC, unsigned int DefIdx) const
- public const llvm::MCWriteProcResEntry * getWriteProcResBegin(const llvm::MCSchedClassDesc * SC) const
- public const llvm::MCWriteProcResEntry * getWriteProcResEnd(const llvm::MCSchedClassDesc * SC) const
- public bool hasFeature(unsigned int Feature) const
- public void initInstrItins(llvm::InstrItineraryData & InstrItins) const
- public bool isCPUStringValid(llvm::StringRef CPU) const
- public virtual unsigned int resolveVariantSchedClass(unsigned int SchedClass, const llvm::MCInst * MI, unsigned int CPUID) const
- public void setDefaultFeatures(llvm::StringRef CPU, llvm::StringRef FS)
- public void setFeatureBits(const llvm::FeatureBitset & FeatureBits_)
- public virtual ~MCSubtargetInfo()
Methods
¶llvm::FeatureBitset ApplyFeatureFlag(
llvm::StringRef FS)
llvm::FeatureBitset ApplyFeatureFlag(
llvm::StringRef FS)
Description
Apply a feature flag and return the re-computed feature bits, including all feature bits implied by the flag.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:142
Parameters
¶llvm::FeatureBitset ClearFeatureBitsTransitively(
const llvm::FeatureBitset& FB)
llvm::FeatureBitset ClearFeatureBitsTransitively(
const llvm::FeatureBitset& FB)
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:146
Parameters
- const llvm::FeatureBitset& FB
¶void InitMCProcessorInfo(llvm::StringRef CPU,
llvm::StringRef FS)
void InitMCProcessorInfo(llvm::StringRef CPU,
llvm::StringRef FS)
Description
Initialize the scheduling model and feature bits. FIXME: Find a way to stick this in the constructor, since it should only be called during initialization.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:121
Parameters
¶MCSubtargetInfo(
const llvm::Triple& TT,
llvm::StringRef CPU,
llvm::StringRef FS,
ArrayRef<llvm::SubtargetFeatureKV> PF,
ArrayRef<llvm::SubtargetSubTypeKV> PD,
const llvm::MCWriteProcResEntry* WPR,
const llvm::MCWriteLatencyEntry* WL,
const llvm::MCReadAdvanceEntry* RA,
const llvm::InstrStage* IS,
const unsigned int* OC,
const unsigned int* FP)
MCSubtargetInfo(
const llvm::Triple& TT,
llvm::StringRef CPU,
llvm::StringRef FS,
ArrayRef<llvm::SubtargetFeatureKV> PF,
ArrayRef<llvm::SubtargetSubTypeKV> PD,
const llvm::MCWriteProcResEntry* WPR,
const llvm::MCWriteLatencyEntry* WL,
const llvm::MCReadAdvanceEntry* RA,
const llvm::InstrStage* IS,
const unsigned int* OC,
const unsigned int* FP)
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:93
Parameters
- const llvm::Triple& TT
- llvm::StringRef CPU
- llvm::StringRef FS
- ArrayRef<llvm::SubtargetFeatureKV> PF
- ArrayRef<llvm::SubtargetSubTypeKV> PD
- const llvm::MCWriteProcResEntry* WPR
- const llvm::MCWriteLatencyEntry* WL
- const llvm::MCReadAdvanceEntry* RA
- const llvm::InstrStage* IS
- const unsigned int* OC
- const unsigned int* FP
¶MCSubtargetInfo()
MCSubtargetInfo()
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:99
¶MCSubtargetInfo(const llvm::MCSubtargetInfo&)
MCSubtargetInfo(const llvm::MCSubtargetInfo&)
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:92
Parameters
- const llvm::MCSubtargetInfo&
¶llvm::FeatureBitset SetFeatureBitsTransitively(
const llvm::FeatureBitset& FB)
llvm::FeatureBitset SetFeatureBitsTransitively(
const llvm::FeatureBitset& FB)
Description
Set/clear additional feature bits, including all other bits they imply.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:145
Parameters
- const llvm::FeatureBitset& FB
¶llvm::FeatureBitset ToggleFeature(
llvm::StringRef FS)
llvm::FeatureBitset ToggleFeature(
llvm::StringRef FS)
Description
Toggle a set of features and return the re-computed feature bits. This version will also change all implied bits.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:138
Parameters
¶llvm::FeatureBitset ToggleFeature(uint64_t FB)
llvm::FeatureBitset ToggleFeature(uint64_t FB)
Description
Toggle a feature and return the re-computed feature bits. This version does not change the implied bits.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:130
Parameters
- uint64_t FB
¶llvm::FeatureBitset ToggleFeature(
const llvm::FeatureBitset& FB)
llvm::FeatureBitset ToggleFeature(
const llvm::FeatureBitset& FB)
Description
Toggle a feature and return the re-computed feature bits. This version does not change the implied bits.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:134
Parameters
- const llvm::FeatureBitset& FB
¶bool checkFeatures(llvm::StringRef FS) const
bool checkFeatures(llvm::StringRef FS) const
Description
Check whether the subtarget features are enabled/disabled as per the provided string, ignoring all other features.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:150
Parameters
¶llvm::StringRef getCPU() const
llvm::StringRef getCPU() const
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:105
¶virtual Optional<unsigned int>
getCacheAssociativity(unsigned int Level) const
virtual Optional<unsigned int>
getCacheAssociativity(unsigned int Level) const
Description
Return the cache associatvity for the given level of cache. Level is zero-based, so a value of zero means the first level of cache.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:237
Parameters
- unsigned int Level
¶virtual Optional<unsigned int> getCacheLineSize(
unsigned int Level) const
virtual Optional<unsigned int> getCacheLineSize(
unsigned int Level) const
Description
Return the target cache line size in bytes at a given level.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:241
Parameters
- unsigned int Level
¶virtual unsigned int getCacheLineSize() const
virtual unsigned int getCacheLineSize() const
Description
Return the target cache line size in bytes. By default, return the line size for the bottom-most level of cache. This provides a more convenient interface for the common case where all cache levels have the same line size. Return zero if there is no cache model.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:249
¶virtual Optional<unsigned int> getCacheSize(
unsigned int Level) const
virtual Optional<unsigned int> getCacheSize(
unsigned int Level) const
Description
Return the cache size in bytes for the given level of cache. Level is zero-based, so a value of zero means the first level of cache.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:231
Parameters
- unsigned int Level
¶const llvm::FeatureBitset& getFeatureBits() const
const llvm::FeatureBitset& getFeatureBits() const
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:107
¶virtual unsigned int getHwMode() const
virtual unsigned int getHwMode() const
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:225
¶llvm::InstrItineraryData getInstrItineraryForCPU(
llvm::StringRef CPU) const
llvm::InstrItineraryData getInstrItineraryForCPU(
llvm::StringRef CPU) const
Description
Get scheduling itinerary of a CPU.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:207
Parameters
- llvm::StringRef CPU
¶virtual unsigned int
getMaxPrefetchIterationsAhead() const
virtual unsigned int
getMaxPrefetchIterationsAhead() const
Description
Return the maximum prefetch distance in terms of loop iterations.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:264
¶virtual unsigned int getMinPrefetchStride() const
virtual unsigned int getMinPrefetchStride() const
Description
Return the minimum stride necessary to trigger software prefetching.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:269
¶virtual unsigned int getPrefetchDistance() const
virtual unsigned int getPrefetchDistance() const
Description
Return the preferred prefetch distance in terms of instructions.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:259
¶int getReadAdvanceCycles(
const llvm::MCSchedClassDesc* SC,
unsigned int UseIdx,
unsigned int WriteResID) const
int getReadAdvanceCycles(
const llvm::MCSchedClassDesc* SC,
unsigned int UseIdx,
unsigned int WriteResID) const
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:177
Parameters
- const llvm::MCSchedClassDesc* SC
- unsigned int UseIdx
- unsigned int WriteResID
¶ArrayRef<llvm::MCReadAdvanceEntry>
getReadAdvanceEntries(
const llvm::MCSchedClassDesc& SC) const
ArrayRef<llvm::MCReadAdvanceEntry>
getReadAdvanceEntries(
const llvm::MCSchedClassDesc& SC) const
Description
Return the set of ReadAdvance entries declared by the scheduling class descriptor in input.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:199
Parameters
- const llvm::MCSchedClassDesc& SC
¶const llvm::MCSchedModel& getSchedModel() const
const llvm::MCSchedModel& getSchedModel() const
Description
Get the machine model for this subtarget's CPU.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:156
¶const llvm::MCSchedModel& getSchedModelForCPU(
llvm::StringRef CPU) const
const llvm::MCSchedModel& getSchedModelForCPU(
llvm::StringRef CPU) const
Description
Get the machine model of a CPU.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:153
Parameters
- llvm::StringRef CPU
¶const llvm::Triple& getTargetTriple() const
const llvm::Triple& getTargetTriple() const
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:104
¶const llvm::MCWriteLatencyEntry*
getWriteLatencyEntry(
const llvm::MCSchedClassDesc* SC,
unsigned int DefIdx) const
const llvm::MCWriteLatencyEntry*
getWriteLatencyEntry(
const llvm::MCSchedClassDesc* SC,
unsigned int DefIdx) const
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:169
Parameters
- const llvm::MCSchedClassDesc* SC
- unsigned int DefIdx
¶const llvm::MCWriteProcResEntry*
getWriteProcResBegin(
const llvm::MCSchedClassDesc* SC) const
const llvm::MCWriteProcResEntry*
getWriteProcResBegin(
const llvm::MCSchedClassDesc* SC) const
Description
Return an iterator at the first process resource consumed by the given scheduling class.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:160
Parameters
- const llvm::MCSchedClassDesc* SC
¶const llvm::MCWriteProcResEntry*
getWriteProcResEnd(
const llvm::MCSchedClassDesc* SC) const
const llvm::MCWriteProcResEntry*
getWriteProcResEnd(
const llvm::MCSchedClassDesc* SC) const
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:164
Parameters
- const llvm::MCSchedClassDesc* SC
¶bool hasFeature(unsigned int Feature) const
bool hasFeature(unsigned int Feature) const
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:112
Parameters
- unsigned int Feature
¶void initInstrItins(
llvm::InstrItineraryData& InstrItins) const
void initInstrItins(
llvm::InstrItineraryData& InstrItins) const
Description
Initialize an InstrItineraryData instance.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:210
Parameters
- llvm::InstrItineraryData& InstrItins
¶bool isCPUStringValid(llvm::StringRef CPU) const
bool isCPUStringValid(llvm::StringRef CPU) const
Description
Check whether the CPU string is valid.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:220
Parameters
- llvm::StringRef CPU
¶virtual unsigned int resolveVariantSchedClass(
unsigned int SchedClass,
const llvm::MCInst* MI,
unsigned int CPUID) const
virtual unsigned int resolveVariantSchedClass(
unsigned int SchedClass,
const llvm::MCInst* MI,
unsigned int CPUID) const
Description
Resolve a variant scheduling class for the given MCInst and CPU.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:214
Parameters
- unsigned int SchedClass
- const llvm::MCInst* MI
- unsigned int CPUID
¶void setDefaultFeatures(llvm::StringRef CPU,
llvm::StringRef FS)
void setDefaultFeatures(llvm::StringRef CPU,
llvm::StringRef FS)
Description
Set the features to the default for the given CPU with an appended feature string.
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:126
Parameters
¶void setFeatureBits(
const llvm::FeatureBitset& FeatureBits_)
void setFeatureBits(
const llvm::FeatureBitset& FeatureBits_)
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:108
Parameters
- const llvm::FeatureBitset& FeatureBits_
¶virtual ~MCSubtargetInfo()
virtual ~MCSubtargetInfo()
Declared at: llvm/include/llvm/MC/MCSubtargetInfo.h:102