LLVM: llvm::MultiHazardRecognizer Class Reference (original) (raw)
#include "[llvm/CodeGen/MultiHazardRecognizer.h](MultiHazardRecognizer%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| MultiHazardRecognizer ()=default | |
| void | AddHazardRecognizer (std::unique_ptr< ScheduleHazardRecognizer > &&) |
| bool | atIssueLimit () const override |
| atIssueLimit - Return true if no more instructions may be issued in this cycle. | |
| HazardType | getHazardType (SUnit *, int Stalls=0) override |
| getHazardType - Return the hazard type of emitting this node. | |
| void | Reset () override |
| Reset - This callback is invoked when a new block of instructions is about to be schedule. | |
| void | EmitInstruction (SUnit *) override |
| EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state. | |
| void | EmitInstruction (MachineInstr *) override |
| This overload will be used when the hazard recognizer is being used by a non-scheduling pass, which does not use SUnits. | |
| unsigned | PreEmitNoops (SUnit *) override |
| PreEmitNoops - This callback is invoked prior to emitting an instruction. | |
| unsigned | PreEmitNoops (MachineInstr *) override |
| This overload will be used when the hazard recognizer is being used by a non-scheduling pass, which does not use SUnits. | |
| bool | ShouldPreferAnother (SUnit *) override |
| ShouldPreferAnother - This callback may be invoked if getHazardType returns NoHazard. | |
| 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. | |
| 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. | |
| void | EmitNoop () override |
| EmitNoop - This callback is invoked when a noop was added to the instruction stream. | |
| Public Member Functions inherited from llvm::ScheduleHazardRecognizer | |
| ScheduleHazardRecognizer ()=default | |
| virtual | ~ScheduleHazardRecognizer () |
| unsigned | getMaxLookAhead () const |
| bool | isEnabled () const |
| virtual void | EmitNoops (unsigned Quantity) |
| EmitNoops - This callback is invoked when noops were added to the instruction stream. |
| 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. |
Definition at line 25 of file MultiHazardRecognizer.h.
| llvm::MultiHazardRecognizer::MultiHazardRecognizer ( ) | default |
|---|
◆ AddHazardRecognizer()
◆ AdvanceCycle()
| void MultiHazardRecognizer::AdvanceCycle ( ) | 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.
Definition at line 79 of file MultiHazardRecognizer.cpp.
◆ atIssueLimit()
| bool MultiHazardRecognizer::atIssueLimit ( ) const | overridevirtual |
|---|
◆ EmitInstruction() [1/2]
| void MultiHazardRecognizer::EmitInstruction ( MachineInstr * ) | overridevirtual |
|---|
◆ EmitInstruction() [2/2]
| void MultiHazardRecognizer::EmitInstruction ( SUnit * ) | overridevirtual |
|---|
◆ EmitNoop()
| void MultiHazardRecognizer::EmitNoop ( ) | overridevirtual |
|---|
◆ getHazardType()
getHazardType - Return the hazard type of emitting this node.
There are three possible results. Either:
- NoHazard: it is legal to issue this instruction on this cycle.
- Hazard: issuing this instruction would stall the machine. If some other instruction is available, issue it first.
- NoopHazard: issuing this instruction would break the program. If some other instruction can be issued, do so, otherwise issue a noop.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 34 of file MultiHazardRecognizer.cpp.
References llvm::ScheduleHazardRecognizer::NoHazard.
◆ PreEmitNoops() [1/2]
◆ PreEmitNoops() [2/2]
| unsigned MultiHazardRecognizer::PreEmitNoops ( SUnit * ) | overridevirtual |
|---|
PreEmitNoops - This callback is invoked prior to emitting an instruction.
It should return the number of noops to emit prior to the provided instruction. Note: This is only used during PostRA scheduling. EmitNoop is not called for these noops.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 58 of file MultiHazardRecognizer.cpp.
◆ RecedeCycle()
| void MultiHazardRecognizer::RecedeCycle ( ) | 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.
Definition at line 84 of file MultiHazardRecognizer.cpp.
◆ Reset()
| void MultiHazardRecognizer::Reset ( ) | overridevirtual |
|---|
◆ ShouldPreferAnother()
| bool MultiHazardRecognizer::ShouldPreferAnother ( SUnit * ) | overridevirtual |
|---|
The documentation for this class was generated from the following files:
- include/llvm/CodeGen/MultiHazardRecognizer.h
- lib/CodeGen/MultiHazardRecognizer.cpp