31 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZHAZARDRECOGNIZER_H 32 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZHAZARDRECOGNIZER_H 53 unsigned CurrGroupSize;
57 bool CurrGroupHas4RegOps;
70 unsigned CriticalResourceIdx;
73 inline unsigned getNumDecoderSlots(
SUnit *SU)
const;
76 bool fitsIntoCurrentGroup(
SUnit *SU)
const;
86 unsigned getCurrCycleIdx(
SUnit *SU =
nullptr)
const;
90 unsigned LastFPdOpCycleIdx;
95 unsigned getCurrGroupSize() {
return CurrGroupSize;};
101 void clearProcResCounters();
105 bool isFPdOpPreferred_distance(
SUnit *SU)
const;
113 : TII(tii), SchedModel(SM) {
118 void Reset()
override;
This class represents lattice values for constants.
const MCSchedClassDesc * getSchedClass(SUnit *SU) const
Resolves and cache a resolved scheduling class for an SUnit.
void Reset() override
Reset - This callback is invoked when a new block of instructions is about to be schedule.
Provide an instruction scheduling machine model to CodeGen passes.
int groupingCost(SUnit *SU) const
Return the cost of decoder grouping for SU.
void dumpProcResourceCounters() const
bool hasInstrSchedModel() const
Return true if this machine model includes an instruction-level scheduling model. ...
SystemZHazardRecognizer maintains the state for one MBB during scheduling.
HazardType getHazardType(SUnit *m, int Stalls=0) override
getHazardType - Return the hazard type of emitting this node.
void EmitInstruction(SUnit *SU) override
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard stat...
void copyState(SystemZHazardRecognizer *Incoming)
Copy counters from end of single predecessor.
MachineInstr * getInstr() const
Returns the representative MachineInstr for this SUnit.
HazardRecognizer - This determines whether or not an instruction can be issued this cycle...
Summarize the scheduling resources required for an instruction of a particular scheduling class...
int resourcesCost(SUnit *SU)
Return the cost of SU in regards to processor resources usage.
void dumpCurrGroup(std::string Msg="") const
const MCSchedClassDesc * SchedClass
nullptr or resolved SchedClass.
void emitInstruction(MachineInstr *MI, bool TakenBranch=false)
Wrap a non-scheduled instruction in an SU and emit it.
const MCSchedClassDesc * resolveSchedClass(const MachineInstr *MI) const
Return the MCSchedClassDesc for this instruction.
Representation of each machine instruction.
SystemZHazardRecognizer(const SystemZInstrInfo *tii, const TargetSchedModel *SM)
MachineBasicBlock::iterator getLastEmittedMI()
This class implements an extremely fast bulk output stream that can only output to a stream...
void dumpSU(SUnit *SU, raw_ostream &OS) const
Scheduling unit. This is a node in the scheduling DAG.