14 #ifndef LLVM_MC_MCSUBTARGETINFO_H 15 #define LLVM_MC_MCSUBTARGETINFO_H 50 const unsigned *OperandCycles;
51 const unsigned *ForwardingPaths;
62 const unsigned *
OC,
const unsigned *
FP);
73 FeatureBits = FeatureBits_;
77 return FeatureBits[Feature];
130 unsigned DefIdx)
const {
131 assert(DefIdx < SC->NumWriteLatencyEntries &&
132 "MachineModel does not specify a WriteResource for DefIdx");
138 unsigned WriteResID)
const {
144 if (
I->UseIdx < UseIdx)
146 if (
I->UseIdx > UseIdx)
149 if (!
I->WriteResourceID ||
I->WriteResourceID == WriteResID) {
165 unsigned CPUID)
const {
172 return Found != ProcDesc.
end() &&
StringRef(Found->Key) == CPU;
183 #endif // LLVM_MC_MCSUBTARGETINFO_H This class represents lattice values for constants.
void setFeatureBits(const FeatureBitset &FeatureBits_)
uint16_t NumReadAdvanceEntries
bool isCPUStringValid(StringRef CPU) const
Check whether the CPU string is valid.
Used to provide key value pairs for CPU and arbitrary pointers.
const Triple & getTargetTriple() const
SI optimize exec mask operations pre RA
virtual std::string getSchedInfoStr(MCInst const &MCI) const
Returns string representation of scheduler comment.
const FeatureBitset & getFeatureBits() const
bool checkFeatures(StringRef FS) const
Check whether the subtarget features are enabled/disabled as per the provided string, ignoring all other features.
const MCSchedModel & getSchedModelForCPU(StringRef CPU) const
Get the machine model of a CPU.
uint16_t NumWriteProcResEntries
const MCWriteLatencyEntry * getWriteLatencyEntry(const MCSchedClassDesc *SC, unsigned DefIdx) const
const MCWriteProcResEntry * getWriteProcResEnd(const MCSchedClassDesc *SC) const
InstrItineraryData getInstrItineraryForCPU(StringRef CPU) const
Get scheduling itinerary of a CPU.
MCSubtargetInfo & operator=(const MCSubtargetInfo &)=delete
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Itinerary data supplied by a subtarget to be used by a target.
auto lower_bound(R &&Range, ForwardIt I) -> decltype(adl_begin(Range))
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
void InitMCProcessorInfo(StringRef CPU, StringRef FS)
Initialize the scheduling model and feature bits.
Instances of this class represent a single low-level machine instruction.
void initInstrItins(InstrItineraryData &InstrItins) const
Initialize an InstrItineraryData instance.
FeatureBitset ToggleFeature(uint64_t FB)
Toggle a feature and return the re-computed feature bits.
virtual ~MCSubtargetInfo()=default
Container class for subtarget features.
Identify one of the processor resource kinds consumed by a particular scheduling class for the specif...
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Summarize the scheduling resources required for an instruction of a particular scheduling class...
FeatureBitset ApplyFeatureFlag(StringRef FS)
Apply a feature flag and return the re-computed feature bits, including all feature bits implied by t...
Triple - Helper class for working with autoconf configuration names.
Specify the latency in cpu cycles for a particular scheduling class and def index.
CHAIN = SC CHAIN, Imm128 - System call.
Specify the number of cycles allowed after instruction issue before a particular use operand reads it...
These values represent a non-pipelined step in the execution of an instruction.
bool hasFeature(unsigned Feature) const
Generic base class for all target subtargets.
virtual unsigned resolveVariantSchedClass(unsigned SchedClass, const MCInst *MI, unsigned CPUID) const
Resolve a variant scheduling class for the given MCInst and CPU.
const MCWriteProcResEntry * getWriteProcResBegin(const MCSchedClassDesc *SC) const
Return an iterator at the first process resource consumed by the given scheduling class...
int getReadAdvanceCycles(const MCSchedClassDesc *SC, unsigned UseIdx, unsigned WriteResID) const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef - Represent a constant reference to a string, i.e.
Machine model for scheduling, bundling, and heuristics.
const MCSchedModel & getSchedModel() const
Get the machine model for this subtarget's CPU.
void setDefaultFeatures(StringRef CPU, StringRef FS)
Set the features to the default for the given CPU with an appended feature string.