|
LLVM
4.0.0
|
SystemZHazardRecognizer maintains the state during scheduling. More...
#include <SystemZHazardRecognizer.h>
Public Member Functions | |
| SystemZHazardRecognizer (const MachineSchedContext *C) | |
| void | setDAG (ScheduleDAGMI *dag) |
| HazardType | getHazardType (SUnit *m, int Stalls=0) 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... | |
| int | groupingCost (SUnit *SU) const |
| Return the cost of decoder grouping for SU. More... | |
| int | resourcesCost (SUnit *SU) |
| Return the cost of SU in regards to processor resources usage. More... | |
| void | dumpSU (SUnit *SU, raw_ostream &OS) const |
| void | dumpCurrGroup (std::string Msg="") const |
| void | dumpProcResourceCounters () const |
Public Member Functions inherited from llvm::ScheduleHazardRecognizer | |
| ScheduleHazardRecognizer () | |
| virtual | ~ScheduleHazardRecognizer () |
| unsigned | getMaxLookAhead () const |
| bool | isEnabled () const |
| virtual bool | atIssueLimit () const |
| atIssueLimit - Return true if no more instructions may be issued in this cycle. More... | |
| 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 | AdvanceCycle () |
| 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... | |
| virtual void | RecedeCycle () |
| 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... | |
| virtual void | EmitNoop () |
| EmitNoop - This callback is invoked when a noop was added to the instruction stream. More... | |
Public Attributes | |
| std::string | CurGroupDbg |
Additional Inherited Members | |
Public Types inherited from llvm::ScheduleHazardRecognizer | |
| enum | HazardType { NoHazard, Hazard, NoopHazard } |
Protected Attributes inherited from llvm::ScheduleHazardRecognizer | |
| unsigned | MaxLookAhead |
| MaxLookAhead - Indicate the number of cycles in the scoreboard state. More... | |
SystemZHazardRecognizer maintains the state during scheduling.
Definition at line 39 of file SystemZHazardRecognizer.h.
| SystemZHazardRecognizer::SystemZHazardRecognizer | ( | const MachineSchedContext * | C | ) |
Definition at line 40 of file SystemZHazardRecognizer.cpp.
| void SystemZHazardRecognizer::dumpCurrGroup | ( | std::string | Msg = "" | ) | const |
Definition at line 161 of file SystemZHazardRecognizer.cpp.
References CurGroupDbg, and llvm::dbgs().
Referenced by EmitInstruction().
| void SystemZHazardRecognizer::dumpProcResourceCounters | ( | ) | const |
Definition at line 175 of file SystemZHazardRecognizer.cpp.
References llvm::dbgs(), llvm::TargetSchedModel::getNumProcResourceKinds(), llvm::TargetSchedModel::getProcResource(), i, and llvm::MCProcResourceDesc::Name.
| void SystemZHazardRecognizer::dumpSU | ( | SUnit * | SU, |
| raw_ostream & | OS | ||
| ) | const |
Definition at line 126 of file SystemZHazardRecognizer.cpp.
References llvm::MCSchedClassDesc::BeginGroup, llvm::MCSchedClassDesc::EndGroup, llvm::SUnit::getInstr(), llvm::TargetSchedModel::getInstrInfo(), llvm::MCInstrInfo::getName(), llvm::MachineInstr::getOpcode(), llvm::TargetSchedModel::getProcResource(), llvm::ScheduleDAGInstrs::getSchedClass(), llvm::TargetSchedModel::getWriteProcResBegin(), llvm::TargetSchedModel::getWriteProcResEnd(), llvm::SUnit::isUnbuffered, llvm::MCSchedClassDesc::isValid(), llvm::MCProcResourceDesc::Name, llvm::SUnit::NodeNum, and llvm::MCSchedClassDesc::NumMicroOps.
Referenced by EmitInstruction(), and llvm::SystemZPostRASchedStrategy::pickNode().
|
overridevirtual |
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 205 of file SystemZHazardRecognizer.cpp.
References assert(), llvm::MCProcResourceDesc::BufferSize, CurGroupDbg, llvm::dbgs(), DEBUG, dumpCurrGroup(), dumpSU(), llvm::MCSchedClassDesc::EndGroup, llvm::SUnit::getInstr(), llvm::TargetSchedModel::getProcResource(), llvm::ScheduleDAGInstrs::getSchedClass(), llvm::TargetSchedModel::getWriteProcResBegin(), llvm::TargetSchedModel::getWriteProcResEnd(), llvm::MachineInstr::isCall(), llvm::SUnit::isUnbuffered, llvm::MCProcResourceDesc::Name, and ProcResCostLim.
Referenced by llvm::SystemZPostRASchedStrategy::schedNode().
|
overridevirtual |
getHazardType - Return the hazard type of emitting this node.
There are three possible results. Either:
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 67 of file SystemZHazardRecognizer.cpp.
References llvm::ScheduleHazardRecognizer::Hazard, and llvm::ScheduleHazardRecognizer::NoHazard.
| int SystemZHazardRecognizer::groupingCost | ( | SUnit * | SU | ) | const |
Return the cost of decoder grouping for SU.
If SU must start a new decoder group, this is negative if this fits the schedule or positive if it would mean ending a group prematurely. For normal instructions this returns 0.
Definition at line 273 of file SystemZHazardRecognizer.cpp.
References llvm::MCSchedClassDesc::BeginGroup, llvm::MCSchedClassDesc::EndGroup, llvm::ScheduleDAGInstrs::getSchedClass(), and llvm::MCSchedClassDesc::isValid().
|
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.
Definition at line 71 of file SystemZHazardRecognizer.cpp.
References CurGroupDbg, and DEBUG.
Referenced by llvm::SystemZPostRASchedStrategy::initialize().
| int SystemZHazardRecognizer::resourcesCost | ( | SUnit * | SU | ) |
Return the cost of SU in regards to processor resources usage.
A positive value means it would be better to wait with SU, while a negative value means it would be good to schedule SU next.
Definition at line 315 of file SystemZHazardRecognizer.cpp.
References llvm::ScheduleDAGInstrs::getSchedClass(), llvm::TargetSchedModel::getWriteProcResBegin(), llvm::TargetSchedModel::getWriteProcResEnd(), llvm::SUnit::isUnbuffered, and llvm::MCSchedClassDesc::isValid().
|
inline |
Definition at line 94 of file SystemZHazardRecognizer.h.
References llvm::ScheduleDAGInstrs::getSchedModel().
Referenced by llvm::SystemZPostRASchedStrategy::initialize().
| std::string llvm::SystemZHazardRecognizer::CurGroupDbg |
Definition at line 119 of file SystemZHazardRecognizer.h.
Referenced by dumpCurrGroup(), EmitInstruction(), and Reset().
1.8.6