LLVM
8.0.1
|
#include "llvm/CodeGen/ScoreboardHazardRecognizer.h"
Public Member Functions | |
ScoreboardHazardRecognizer (const InstrItineraryData *II, const ScheduleDAG *DAG, const char *ParentDebugType="") | |
bool | atIssueLimit () const override |
atIssueLimit - Return true if no more instructions may be issued in this cycle. More... | |
HazardType | getHazardType (SUnit *SU, int Stalls) override |
getHazardType - Return the hazard type of emitting this node. More... | |
void | Reset () override |
Reset - This callback is invoked when a new block of instructions is about to be schedule. More... | |
void | EmitInstruction (SUnit *SU) override |
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state. More... | |
void | AdvanceCycle () override |
AdvanceCycle - This callback is invoked whenever the next top-down instruction to be scheduled cannot issue in the current cycle, either because of latency or resource conflicts. More... | |
void | RecedeCycle () override |
RecedeCycle - This callback is invoked whenever the next bottom-up instruction to be scheduled cannot issue in the current cycle, either because of latency or resource conflicts. More... | |
Public Member Functions inherited from llvm::ScheduleHazardRecognizer | |
ScheduleHazardRecognizer ()=default | |
virtual | ~ScheduleHazardRecognizer () |
unsigned | getMaxLookAhead () const |
bool | isEnabled () const |
virtual void | EmitInstruction (MachineInstr *) |
This overload will be used when the hazard recognizer is being used by a non-scheduling pass, which does not use SUnits. More... | |
virtual unsigned | PreEmitNoops (SUnit *) |
PreEmitNoops - This callback is invoked prior to emitting an instruction. More... | |
virtual unsigned | PreEmitNoops (MachineInstr *) |
This overload will be used when the hazard recognizer is being used by a non-scheduling pass, which does not use SUnits. More... | |
virtual bool | ShouldPreferAnother (SUnit *) |
ShouldPreferAnother - This callback may be invoked if getHazardType returns NoHazard. More... | |
virtual void | EmitNoop () |
EmitNoop - This callback is invoked when a noop was added to the instruction stream. More... | |
Additional Inherited Members | |
Public Types inherited from llvm::ScheduleHazardRecognizer | |
enum | HazardType { NoHazard, Hazard, NoopHazard } |
Protected Attributes inherited from llvm::ScheduleHazardRecognizer | |
unsigned | MaxLookAhead = 0 |
MaxLookAhead - Indicate the number of cycles in the scoreboard state. More... | |
Definition at line 30 of file ScoreboardHazardRecognizer.h.
ScoreboardHazardRecognizer::ScoreboardHazardRecognizer | ( | const InstrItineraryData * | II, |
const ScheduleDAG * | DAG, | ||
const char * | ParentDebugType = "" |
||
) |
Definition at line 31 of file ScoreboardHazardRecognizer.cpp.
References llvm::InstrItineraryData::beginStage(), llvm::dbgs(), E, llvm::InstrItineraryData::endStage(), llvm::InstrStage::getCycles(), llvm::InstrStage::getNextCycles(), llvm::InstrItineraryData::isEmpty(), llvm::ScheduleHazardRecognizer::isEnabled(), llvm::InstrItineraryData::isEndMarker(), llvm::MCSchedModel::IssueWidth, LLVM_DEBUG, llvm::ScheduleHazardRecognizer::MaxLookAhead, and llvm::InstrItineraryData::SchedModel.
|
overridevirtual |
AdvanceCycle - This callback is invoked whenever the next top-down instruction to be scheduled cannot issue in the current cycle, either because of latency or resource conflicts.
This should increment the internal state of the hazard recognizer so that previously "Hazard" instructions will now not be hazards.
Reimplemented from llvm::ScheduleHazardRecognizer.
Reimplemented in llvm::PPCDispatchGroupSBHazardRecognizer, and llvm::ARMHazardRecognizer.
Definition at line 230 of file ScoreboardHazardRecognizer.cpp.
Referenced by llvm::ARMHazardRecognizer::AdvanceCycle(), and llvm::PPCDispatchGroupSBHazardRecognizer::AdvanceCycle().
|
overridevirtual |
atIssueLimit - Return true if no more instructions may be issued in this cycle.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 105 of file ScoreboardHazardRecognizer.cpp.
|
overridevirtual |
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state.
Reimplemented from llvm::ScheduleHazardRecognizer.
Reimplemented in llvm::PPCDispatchGroupSBHazardRecognizer, and llvm::ARMHazardRecognizer.
Definition at line 172 of file ScoreboardHazardRecognizer.cpp.
References assert(), llvm::InstrItineraryData::beginStage(), E, llvm::InstrItineraryData::endStage(), llvm::ScheduleDAG::getInstrDesc(), llvm::MCInstrDesc::getSchedClass(), llvm::InstrItineraryData::isEmpty(), llvm::TargetInstrInfo::isZeroCost(), LLVM_DEBUG, LLVM_FALLTHROUGH, llvm::MCInstrDesc::Opcode, llvm::InstrStage::Required, llvm::InstrStage::Reserved, and llvm::ScheduleDAG::TII.
Referenced by llvm::ARMHazardRecognizer::EmitInstruction(), and llvm::PPCDispatchGroupSBHazardRecognizer::EmitInstruction().
|
overridevirtual |
getHazardType - Return the hazard type of emitting this node.
There are three possible results. Either:
Reimplemented from llvm::ScheduleHazardRecognizer.
Reimplemented in llvm::ARMHazardRecognizer, and llvm::PPCDispatchGroupSBHazardRecognizer.
Definition at line 113 of file ScoreboardHazardRecognizer.cpp.
References assert(), llvm::InstrItineraryData::beginStage(), llvm::dbgs(), llvm::ScheduleDAG::dumpNode(), E, llvm::InstrItineraryData::endStage(), llvm::ScheduleDAG::getInstrDesc(), llvm::MCInstrDesc::getSchedClass(), llvm::ScheduleHazardRecognizer::Hazard, llvm::InstrItineraryData::isEmpty(), LLVM_DEBUG, LLVM_FALLTHROUGH, llvm::ScheduleHazardRecognizer::NoHazard, llvm::InstrStage::Required, and llvm::InstrStage::Reserved.
Referenced by llvm::ARMHazardRecognizer::getHazardType(), and llvm::PPCDispatchGroupSBHazardRecognizer::getHazardType().
|
overridevirtual |
RecedeCycle - This callback is invoked whenever the next bottom-up instruction to be scheduled cannot issue in the current cycle, either because of latency or resource conflicts.
Reimplemented from llvm::ScheduleHazardRecognizer.
Reimplemented in llvm::PPCDispatchGroupSBHazardRecognizer, and llvm::ARMHazardRecognizer.
Definition at line 236 of file ScoreboardHazardRecognizer.cpp.
|
overridevirtual |
Reset - This callback is invoked when a new block of instructions is about to be schedule.
The hazard state should be set to an initialized state.
Reimplemented from llvm::ScheduleHazardRecognizer.
Reimplemented in llvm::PPCDispatchGroupSBHazardRecognizer, and llvm::ARMHazardRecognizer.
Definition at line 81 of file ScoreboardHazardRecognizer.cpp.
References llvm::dbgs(), llvm::Depth, dump(), and LLVM_DUMP_METHOD.
Referenced by llvm::ARMHazardRecognizer::Reset(), and llvm::PPCDispatchGroupSBHazardRecognizer::Reset().