|
LLVM
10.0.0
|
#include "Target/AMDGPU/GCNHazardRecognizer.h"
Public Types | |
| typedef function_ref< bool(MachineInstr *)> | IsHazardFn |
Public Types inherited from llvm::ScheduleHazardRecognizer | |
| enum | HazardType { NoHazard, Hazard, NoopHazard } |
Public Member Functions | |
| GCNHazardRecognizer (const MachineFunction &MF) | |
| bool | atIssueLimit () const override |
| atIssueLimit - Return true if no more instructions may be issued in this cycle. More... | |
| void | EmitInstruction (SUnit *SU) override |
| EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state. More... | |
| void | EmitInstruction (MachineInstr *MI) override |
| This overload will be used when the hazard recognizer is being used by a non-scheduling pass, which does not use SUnits. More... | |
| HazardType | getHazardType (SUnit *SU, int Stalls) override |
| getHazardType - Return the hazard type of emitting this node. More... | |
| void | EmitNoop () override |
| EmitNoop - This callback is invoked when a noop was added to the instruction stream. More... | |
| unsigned | PreEmitNoops (SUnit *SU) override |
| PreEmitNoops - This callback is invoked prior to emitting an instruction. More... | |
| 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. More... | |
| unsigned | PreEmitNoopsCommon (MachineInstr *) |
| 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 | Reset () |
| Reset - This callback is invoked when a new block of instructions is about to be schedule. More... | |
| virtual bool | ShouldPreferAnother (SUnit *) |
| ShouldPreferAnother - This callback may be invoked if getHazardType returns NoHazard. More... | |
Additional Inherited Members | |
Protected Attributes inherited from llvm::ScheduleHazardRecognizer | |
| unsigned | MaxLookAhead = 0 |
| MaxLookAhead - Indicate the number of cycles in the scoreboard state. More... | |
Definition at line 33 of file GCNHazardRecognizer.h.
Definition at line 35 of file GCNHazardRecognizer.h.
| GCNHazardRecognizer::GCNHazardRecognizer | ( | const MachineFunction & | MF | ) |
Definition at line 40 of file GCNHazardRecognizer.cpp.
References llvm::MachineFunction::getRegInfo(), llvm::TargetSchedModel::init(), llvm::MachineRegisterInfo::isPhysRegUsed(), and llvm::ScheduleHazardRecognizer::MaxLookAhead.
|
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 309 of file GCNHazardRecognizer.cpp.
References llvm::numbers::e, llvm::ScheduleHazardRecognizer::getMaxLookAhead(), llvm::SIInstrInfo::getNumWaitStates(), llvm::MachineInstr::isBundle(), llvm::MachineInstr::isDebugInstr(), llvm::MachineInstr::isImplicitDef(), and llvm::MachineInstr::isKill().
Referenced by atIssueLimit().
|
inlineoverridevirtual |
atIssueLimit - Return true if no more instructions may be issued in this cycle.
FIXME: remove this once MachineScheduler is the only client.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 103 of file GCNHazardRecognizer.h.
References AdvanceCycle(), EmitInstruction(), EmitNoop(), getHazardType(), PreEmitNoops(), PreEmitNoopsCommon(), and RecedeCycle().
|
overridevirtual |
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 53 of file GCNHazardRecognizer.cpp.
References llvm::SUnit::getInstr().
Referenced by atIssueLimit().
|
overridevirtual |
This overload will be used when the hazard recognizer is being used by a non-scheduling pass, which does not use SUnits.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 57 of file GCNHazardRecognizer.cpp.
References MI.
|
overridevirtual |
EmitNoop - This callback is invoked when a noop was added to the instruction stream.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 305 of file GCNHazardRecognizer.cpp.
Referenced by atIssueLimit().
|
overridevirtual |
getHazardType - Return the hazard type of emitting this node.
There are three possible results. Either:
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 132 of file GCNHazardRecognizer.cpp.
References llvm::SUnit::getInstr(), llvm::MachineInstr::getOpcode(), llvm::GCNSubtarget::hasNoDataDepHazard(), llvm::GCNSubtarget::hasNSAtoVMEMBug(), llvm::GCNSubtarget::hasReadM0MovRelInterpHazard(), llvm::GCNSubtarget::hasReadM0SendMsgHazard(), llvm::MachineInstr::isBundle(), isDivFMas(), llvm::SIInstrInfo::isDPP(), llvm::SIInstrInfo::isFLAT(), llvm::MachineInstr::isInlineAsm(), llvm::SIInstrInfo::isMAI(), isRFE(), isRWLane(), isSendMsgTraceDataOrGDS(), isSGetReg(), isSMovRel(), llvm::SIInstrInfo::isSMRD(), isSSetReg(), llvm::SIInstrInfo::isVALU(), llvm::SIInstrInfo::isVINTRP(), llvm::SIInstrInfo::isVMEM(), llvm::MachineInstr::mayLoadOrStore(), MI, llvm::ScheduleHazardRecognizer::NoHazard, and llvm::ScheduleHazardRecognizer::NoopHazard.
Referenced by atIssueLimit().
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 231 of file GCNHazardRecognizer.cpp.
References llvm::SUnit::getInstr(), and PreEmitNoopsCommon().
Referenced by atIssueLimit().
|
overridevirtual |
This overload will be used when the hazard recognizer is being used by a non-scheduling pass, which does not use SUnits.
Reimplemented from llvm::ScheduleHazardRecognizer.
Definition at line 236 of file GCNHazardRecognizer.cpp.
References MI, PreEmitNoopsCommon(), and llvm::RISCVFenceField::W.
| unsigned GCNHazardRecognizer::PreEmitNoopsCommon | ( | MachineInstr * | MI | ) |
Definition at line 245 of file GCNHazardRecognizer.cpp.
References llvm::MachineInstr::getOpcode(), llvm::GCNSubtarget::hasNoDataDepHazard(), llvm::GCNSubtarget::hasNSAtoVMEMBug(), llvm::GCNSubtarget::hasReadM0MovRelInterpHazard(), llvm::GCNSubtarget::hasReadM0SendMsgHazard(), llvm::MachineInstr::isBundle(), isDivFMas(), llvm::SIInstrInfo::isDPP(), llvm::SIInstrInfo::isFLAT(), llvm::MachineInstr::isInlineAsm(), llvm::SIInstrInfo::isMAI(), isRFE(), isRWLane(), isSendMsgTraceDataOrGDS(), isSGetReg(), isSMovRel(), llvm::SIInstrInfo::isSMRD(), isSSetReg(), llvm::SIInstrInfo::isVALU(), llvm::SIInstrInfo::isVINTRP(), llvm::SIInstrInfo::isVMEM(), llvm::max(), and llvm::MachineInstr::mayLoadOrStore().
Referenced by atIssueLimit(), insertNoopInBundle(), and PreEmitNoops().
|
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 348 of file GCNHazardRecognizer.cpp.
References llvm_unreachable.
Referenced by atIssueLimit().
1.8.13