Go to the documentation of this file.
30 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZHAZARDRECOGNIZER_H
31 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZHAZARDRECOGNIZER_H
52 unsigned CurrGroupSize;
56 bool CurrGroupHas4RegOps;
69 unsigned CriticalResourceIdx;
72 inline unsigned getNumDecoderSlots(
SUnit *SU)
const;
75 bool fitsIntoCurrentGroup(
SUnit *SU)
const;
85 unsigned getCurrCycleIdx(
SUnit *SU =
nullptr)
const;
89 unsigned LastFPdOpCycleIdx;
94 unsigned getCurrGroupSize() {
return CurrGroupSize;};
100 void clearProcResCounters();
104 bool isFPdOpPreferred_distance(
SUnit *SU)
const;
112 :
TII(tii), SchedModel(SM) {
117 void Reset()
override;
void EmitInstruction(SUnit *SU) override
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard stat...
This is an optimization pass for GlobalISel generic memory operations.
const MCSchedClassDesc * getSchedClass(SUnit *SU) const
Resolves and cache a resolved scheduling class for an SUnit.
SystemZHazardRecognizer maintains the state for one MBB during scheduling.
Summarize the scheduling resources required for an instruction of a particular scheduling class.
const HexagonInstrInfo * TII
This class implements an extremely fast bulk output stream that can only output to a stream.
HazardType getHazardType(SUnit *SU, int Stalls=0) override
getHazardType - Return the hazard type of emitting this node.
void copyState(SystemZHazardRecognizer *Incoming)
Copy counters from end of single predecessor.
const MCSchedClassDesc * resolveSchedClass(const MachineInstr *MI) const
Return the MCSchedClassDesc for this instruction.
void Reset() override
Reset - This callback is invoked when a new block of instructions is about to be schedule.
void emitInstruction(MachineInstr *MI, bool TakenBranch=false)
Wrap a non-scheduled instruction in an SU and emit it.
Provide an instruction scheduling machine model to CodeGen passes.
Representation of each machine instruction.
MachineInstr * getInstr() const
Returns the representative MachineInstr for this SUnit.
MachineBasicBlock::iterator getLastEmittedMI()
int groupingCost(SUnit *SU) const
Return the cost of decoder grouping for SU.
void dumpProcResourceCounters() const
const MCSchedClassDesc * SchedClass
nullptr or resolved SchedClass.
int resourcesCost(SUnit *SU)
Return the cost of SU in regards to processor resources usage.
SystemZHazardRecognizer(const SystemZInstrInfo *tii, const TargetSchedModel *SM)
void dumpCurrGroup(std::string Msg="") const
const CustomOperand< const MCSubtargetInfo & > Msg[]
void dumpSU(SUnit *SU, raw_ostream &OS) const
Scheduling unit. This is a node in the scheduling DAG.
HazardRecognizer - This determines whether or not an instruction can be issued this cycle,...
bool hasInstrSchedModel() const
Return true if this machine model includes an instruction-level scheduling model.