13#ifndef LLVM_MC_MCSUBTARGETINFO_H
14#define LLVM_MC_MCSUBTARGETINFO_H
92 const unsigned *OperandCycles;
93 const unsigned *ForwardingPaths;
95 std::string FeatureString;
105 const unsigned *OC,
const unsigned *
FP);
117 FeatureBits = FeatureBits_;
123 return FeatureBits[Feature];
180 unsigned DefIdx)
const {
181 assert(DefIdx < SC->NumWriteLatencyEntries &&
182 "MachineModel does not specify a WriteResource for DefIdx");
188 unsigned WriteResID)
const {
194 if (
I->UseIdx < UseIdx)
196 if (
I->UseIdx > UseIdx)
199 if (!
I->WriteResourceID ||
I->WriteResourceID == WriteResID) {
226 unsigned CPUID)
const {
233 return Found != ProcDesc.
end() &&
StringRef(Found->Key) == CPU;
247 std::vector<SubtargetFeatureKV> getEnabledProcessorFeatures()
const;
280 virtual std::optional<unsigned> getCacheSize(
unsigned Level)
const;
286 virtual std::optional<unsigned> getCacheAssociativity(
unsigned Level)
const;
290 virtual std::optional<unsigned> getCacheLineSize(
unsigned Level)
const;
299 std::optional<unsigned>
Size = getCacheLineSize(0);
308 virtual unsigned getPrefetchDistance()
const;
313 virtual unsigned getMaxPrefetchIterationsAhead()
const;
317 virtual bool enableWritePrefetching()
const;
322 virtual unsigned getMinPrefetchStride(
unsigned NumMemAccesses,
323 unsigned NumStridedMemAccesses,
324 unsigned NumPrefetches,
328 virtual bool shouldPrefetchAddressSpace(
unsigned AS)
const;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static void ApplyFeatureFlag(FeatureBitset &Bits, StringRef Feature, ArrayRef< SubtargetFeatureKV > FeatureTable)
SI optimize exec mask operations pre RA
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Class used to store the subtarget bits in the tables created by tablegen.
Container class for subtarget features.
Itinerary data supplied by a subtarget to be used by a target.
Instances of this class represent a single low-level machine instruction.
Interface to description of machine instruction set.
Generic base class for all target subtargets.
virtual unsigned getCacheLineSize() const
Return the target cache line size in bytes.
const MCWriteProcResEntry * getWriteProcResEnd(const MCSchedClassDesc *SC) const
bool hasFeature(unsigned Feature) const
int getReadAdvanceCycles(const MCSchedClassDesc *SC, unsigned UseIdx, unsigned WriteResID) const
StringRef getFeatureString() const
void setFeatureBits(const FeatureBitset &FeatureBits_)
virtual unsigned resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, const MCInstrInfo *MCII, unsigned CPUID) const
Resolve a variant scheduling class for the given MCInst and CPU.
const Triple & getTargetTriple() const
ArrayRef< SubtargetSubTypeKV > getAllProcessorDescriptions() const
Return processor descriptions.
ArrayRef< MCReadAdvanceEntry > getReadAdvanceEntries(const MCSchedClassDesc &SC) const
Return the set of ReadAdvance entries declared by the scheduling class descriptor in input.
const MCWriteLatencyEntry * getWriteLatencyEntry(const MCSchedClassDesc *SC, unsigned DefIdx) const
MCSubtargetInfo & operator=(const MCSubtargetInfo &)=delete
MCSubtargetInfo & operator=(MCSubtargetInfo &&)=delete
const FeatureBitset & getFeatureBits() const
HwModeType
HwMode IDs are stored and accessed in a bit set format, enabling users to efficiently retrieve specif...
ArrayRef< SubtargetFeatureKV > getAllProcessorFeatures() const
Return processor features.
virtual ~MCSubtargetInfo()=default
StringRef getTuneCPU() const
MCSubtargetInfo(const MCSubtargetInfo &)=default
virtual bool isCPUStringValid(StringRef CPU) const
Check whether the CPU string is valid.
virtual unsigned getHwModeSet() const
Return a bit set containing all HwMode IDs of the current subtarget.
const MCWriteProcResEntry * getWriteProcResBegin(const MCSchedClassDesc *SC) const
Return an iterator at the first process resource consumed by the given scheduling class.
virtual unsigned getHwMode(enum HwModeType type=HwMode_Default) const
HwMode ID corresponding to the 'type' parameter is retrieved from the HwMode bit set of the current s...
const MCSchedModel & getSchedModel() const
Get the machine model for this subtarget's CPU.
StringRef - Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
This is an optimization pass for GlobalISel generic memory operations.
auto lower_bound(R &&Range, T &&Value)
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
These values represent a non-pipelined step in the execution of an instruction.
Specify the number of cycles allowed after instruction issue before a particular use operand reads it...
Summarize the scheduling resources required for an instruction of a particular scheduling class.
uint16_t NumReadAdvanceEntries
uint16_t NumWriteProcResEntries
Machine model for scheduling, bundling, and heuristics.
Specify the latency in cpu cycles for a particular scheduling class and def index.
Identify one of the processor resource kinds consumed by a particular scheduling class for the specif...
Used to provide key value pairs for feature and CPU bit flags.
bool operator<(StringRef S) const
Compare routine for std::lower_bound.
bool operator<(const SubtargetFeatureKV &Other) const
Compare routine for std::is_sorted.
unsigned Value
K-V integer value.
const char * Key
K-V key string.
const char * Desc
Help descriptor.
FeatureBitArray Implies
K-V bit mask.
Used to provide key value pairs for feature and CPU bit flags.
const MCSchedModel * SchedModel
FeatureBitArray Implies
K-V bit mask.
const char * Key
K-V key string.
FeatureBitArray TuneImplies
K-V bit mask.
bool operator<(const SubtargetSubTypeKV &Other) const
Compare routine for std::is_sorted.
bool operator<(StringRef S) const
Compare routine for std::lower_bound.