|
LLVM
4.0.0
|
#include <HexagonHazardRecognizer.h>
Public Member Functions | |
| HexagonHazardRecognizer (const InstrItineraryData *II, const HexagonInstrInfo *HII, const HexagonSubtarget &ST) | |
| ~HexagonHazardRecognizer () override | |
| void | Reset () override |
| This callback is invoked when a new block of instructions is about to be scheduled. More... | |
| HazardType | getHazardType (SUnit *SU, int stalls) override |
| Return the hazard type of emitting this node. More... | |
| void | EmitInstruction (SUnit *) override |
| This callback is invoked when an instruction is emitted to be scheduled, to advance the hazard state. More... | |
| bool | ShouldPreferAnother (SUnit *) override |
| This callback may be invoked if getHazardType returns NoHazard. More... | |
| void | AdvanceCycle () override |
| 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... | |
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 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... | |
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... | |
Definition at line 23 of file HexagonHazardRecognizer.h.
|
inline |
Definition at line 37 of file HexagonHazardRecognizer.h.
|
inlineoverride |
Definition at line 43 of file HexagonHazardRecognizer.h.
|
overridevirtual |
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.
Definition at line 74 of file HexagonHazardRecognizer.cpp.
References llvm::SmallSet< T, N, C >::clear(), llvm::DFAPacketizer::clearResources(), llvm::dbgs(), and DEBUG.
|
overridevirtual |
This callback is invoked when an instruction is emitted to be scheduled, to advance the hazard state.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 93 of file HexagonHazardRecognizer.cpp.
References assert(), llvm::DFAPacketizer::canReserveResources(), llvm::dbgs(), DEBUG, llvm::MachineInstr::getDebugLoc(), llvm::HexagonInstrInfo::getDotNewOp(), llvm::SUnit::getHeight(), llvm::SUnit::getInstr(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::SmallSet< T, N, C >::insert(), llvm::HexagonInstrInfo::mayBeCurLoad(), llvm::HexagonInstrInfo::mayBeNewStore(), MI, llvm::MachineInstr::operands(), llvm::DFAPacketizer::reserveResources(), and llvm::SUnit::Succs.
|
overridevirtual |
Return the hazard type of emitting this node.
There are three possible results. Either:
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 38 of file HexagonHazardRecognizer.cpp.
References llvm::DFAPacketizer::canReserveResources(), llvm::SmallSet< T, N, C >::count(), llvm::MachineFunction::CreateMachineInstr(), llvm::dbgs(), DEBUG, llvm::MachineFunction::DeleteMachineInstr(), llvm::MachineInstr::getDebugLoc(), llvm::HexagonInstrInfo::getDotNewOp(), llvm::SUnit::getInstr(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::ScheduleHazardRecognizer::Hazard, llvm::MachineOperand::isReg(), llvm::HexagonInstrInfo::mayBeNewStore(), MI, and llvm::ScheduleHazardRecognizer::NoHazard.
|
overridevirtual |
This callback is invoked when a new block of instructions is about to be scheduled.
The hazard state is set to an initialized state.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 28 of file HexagonHazardRecognizer.cpp.
References llvm::SmallSet< T, N, C >::clear(), llvm::DFAPacketizer::clearResources(), llvm::dbgs(), and DEBUG.
This callback may be invoked if getHazardType returns NoHazard.
If a packet contains a dot cur instruction, then we may prefer the instruction that can use the dot cur result.
If, even though there is no hazard, it would be better to schedule another available instruction, this callback should return true.
Or, if the use isn't scheduled in the same packet, then prefer other instructions in the subsequent packet.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 89 of file HexagonHazardRecognizer.cpp.
1.8.6