14 #ifndef LLVM_MC_MCSUBTARGETINFO_H
15 #define LLVM_MC_MCSUBTARGETINFO_H
51 const unsigned *OperandCycles;
52 const unsigned *ForwardingPaths;
63 const unsigned *
OC,
const unsigned *FP);
86 FeatureBits = FeatureBits_;
90 return FeatureBits[Feature];
140 unsigned DefIdx)
const {
141 assert(DefIdx < SC->NumWriteLatencyEntries &&
142 "MachineModel does not specify a WriteResource for DefIdx");
148 unsigned WriteResID)
const {
154 if (
I->UseIdx < UseIdx)
156 if (
I->UseIdx > UseIdx)
159 if (!
I->WriteResourceID ||
I->WriteResourceID == WriteResID) {
175 auto Found = std::lower_bound(ProcDesc.begin(), ProcDesc.end(), CPU);
176 return Found != ProcDesc.end() &&
StringRef(Found->Key) == CPU;
191 #endif // LLVM_MC_MCSUBTARGETINFO_H
unsigned NumWriteProcResEntries
InstrItineraryData getInstrItineraryForCPU(StringRef CPU) const
getInstrItineraryForCPU - Get scheduling itinerary of a CPU.
void setFeatureBits(const FeatureBitset &FeatureBits_)
setFeatureBits - Set the feature bits.
const MCWriteProcResEntry * getWriteProcResBegin(const MCSchedClassDesc *SC) const
Return an iterator at the first process resource consumed by the given scheduling class...
Used to provide key value pairs for CPU and arbitrary pointers.
void initInstrItins(InstrItineraryData &InstrItins) const
Initialize an InstrItineraryData instance.
const MCWriteProcResEntry * getWriteProcResEnd(const MCSchedClassDesc *SC) const
const MCSchedModel & getSchedModelForCPU(StringRef CPU) const
getSchedModelForCPU - Get the machine model of a CPU.
int getReadAdvanceCycles(const MCSchedClassDesc *SC, unsigned UseIdx, unsigned WriteResID) const
StringRef getCPU() const
getCPU - Return the CPU string.
const MCSchedModel & getSchedModel() const
Get the machine model for this subtarget's 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.
void InitMCProcessorInfo(StringRef CPU, StringRef FS)
Initialize the scheduling model and feature bits.
Instances of this class represent a single low-level machine instruction.
unsigned NumReadAdvanceEntries
FeatureBitset ToggleFeature(uint64_t FB)
ToggleFeature - Toggle a feature and returns the re-computed feature bits.
virtual ~MCSubtargetInfo()=default
bool isCPUStringValid(StringRef CPU) const
Check whether the CPU string is valid.
Container class for subtarget features.
Identify one of the processor resource kinds consumed by a particular scheduling class for the specif...
Summarize the scheduling resources required for an instruction of a particular scheduling class...
const MCWriteLatencyEntry * getWriteLatencyEntry(const MCSchedClassDesc *SC, unsigned DefIdx) const
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.
const FeatureBitset & getFeatureBits() const
getFeatureBits - Return the feature bits.
Specify the number of cycles allowed after instruction issue before a particular use operand reads it...
virtual std::string getSchedInfoStr(MCInst const &MCI) const
Representation of each machine instruction.
These values represent a non-pipelined step in the execution of an instruction.
MCSubtargetInfo - Generic base class for all target subtargets.
const Triple & getTargetTriple() const
getTargetTriple - Return the target triple string.
bool hasFeature(unsigned Feature) const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual std::string getSchedInfoStr(const MachineInstr &MI) const
Returns string representation of scheduler comment.
StringRef - Represent a constant reference to a string, i.e.
Machine model for scheduling, bundling, and heuristics.
void setDefaultFeatures(StringRef CPU, StringRef FS)
Set the features to the default for the given CPU with an appended feature string.