16 #ifndef LLVM_CODEGEN_SCOREBOARDHAZARDRECOGNIZER_H
17 #define LLVM_CODEGEN_SCOREBOARDHAZARDRECOGNIZER_H
26 class InstrItineraryData;
41 unsigned *
Data =
nullptr;
52 Scoreboard() =
default;
58 size_t getDepth()
const {
return Depth; }
60 unsigned& operator[](
size_t idx)
const {
63 "Scoreboard was not initialized properly!");
68 void reset(
size_t d = 1) {
79 Head = (Head + 1) & (
Depth-1);
83 Head = (Head - 1) & (
Depth-1);
92 const char *DebugType;
100 unsigned IssueWidth = 0;
103 unsigned IssueCount = 0;
105 Scoreboard ReservedScoreboard;
106 Scoreboard RequiredScoreboard;
111 const char *ParentDebugType =
"");
120 void Reset()
override;
128 #endif // LLVM_CODEGEN_SCOREBOARDHAZARDRECOGNIZER_H
void RecedeCycle() override
RecedeCycle - This callback is invoked whenever the next bottom-up instruction to be scheduled cannot...
bool atIssueLimit() const override
atIssueLimit - Return true if no more instructions may be issued in this cycle.
void EmitInstruction(SUnit *SU) override
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard stat...
Itinerary data supplied by a subtarget to be used by a target.
ScoreboardHazardRecognizer(const InstrItineraryData *ItinData, const ScheduleDAG *DAG, const char *ParentDebugType="")
HazardType getHazardType(SUnit *SU, int Stalls) override
getHazardType - Return the hazard type of emitting this node.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
HazardRecognizer - This determines whether or not an instruction can be issued this cycle...
void Reset() override
Reset - This callback is invoked when a new block of instructions is about to be schedule.
void AdvanceCycle() override
AdvanceCycle - This callback is invoked whenever the next top-down instruction to be scheduled cannot...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Scheduling unit. This is a node in the scheduling DAG.