LLVM: llvm::GCNHazardRecognizer Class Reference (original) (raw)

#include "[Target/AMDGPU/GCNHazardRecognizer.h](GCNHazardRecognizer%5F8h%5Fsource.html)"

Public Types
typedef function_ref< bool(const MachineInstr &)> IsHazardFn
typedef function_ref< bool(const MachineInstr &, int WaitStates)> IsExpiredFn
typedef function_ref< unsigned int(const MachineInstr &)> GetNumWaitStatesFn
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.
void EmitInstruction (SUnit *SU) override
EmitInstruction - This callback is invoked when an instruction is emitted, to advance the hazard state.
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.
HazardType getHazardType (SUnit *SU, int Stalls) override
getHazardType - Return the hazard type of emitting this node.
void EmitNoop () override
EmitNoop - This callback is invoked when a noop was added to the instruction stream.
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.
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.
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.
bool ShouldPreferAnother (SUnit *SU) override
ShouldPreferAnother - This callback may be invoked if getHazardType returns NoHazard.
void Reset () override
Reset - This callback is invoked when a new block of instructions is about to be schedule.
Public Member Functions inherited from llvm::ScheduleHazardRecognizer
ScheduleHazardRecognizer ()=default
virtual ~ScheduleHazardRecognizer ()
unsigned getMaxLookAhead () const
bool isEnabled () const
virtual unsigned PreEmitNoops (SUnit *)
PreEmitNoops - This callback is invoked prior to emitting an instruction.
virtual void EmitNoops (unsigned Quantity)
EmitNoops - This callback is invoked when noops were added to the instruction stream.

Definition at line 32 of file GCNHazardRecognizer.h.

GetNumWaitStatesFn

IsExpiredFn

IsHazardFn

AdvanceCycle()

void GCNHazardRecognizer::AdvanceCycle ( ) overridevirtual

atIssueLimit()

bool llvm::GCNHazardRecognizer::atIssueLimit ( ) const inlineoverridevirtual

EmitInstruction() [1/2]

void GCNHazardRecognizer::EmitInstruction ( MachineInstr * ) overridevirtual

EmitInstruction() [2/2]

void GCNHazardRecognizer::EmitInstruction ( SUnit * ) overridevirtual

EmitNoop()

void GCNHazardRecognizer::EmitNoop ( ) overridevirtual

getHazardType()

getHazardType - Return the hazard type of emitting this node.

There are three possible results. Either:

Reimplemented from llvm::ScheduleHazardRecognizer.

Definition at line 175 of file GCNHazardRecognizer.cpp.

References llvm::SUnit::getInstr(), llvm::ScheduleHazardRecognizer::Hazard, isDivFMas(), llvm::SIInstrInfo::isDPP(), llvm::SIInstrInfo::isDS(), llvm::SIInstrInfo::isEXP(), isLdsDma(), llvm::SIInstrInfo::isMAI(), isRFE(), isRWLane(), isSendMsgTraceDataOrGDS(), isSGetReg(), isSMovRel(), llvm::SIInstrInfo::isSMRD(), isSSetReg(), llvm::SIInstrInfo::isVALU(), llvm::SIInstrInfo::isVMEM(), MI, llvm::ScheduleHazardRecognizer::NoHazard, and llvm::ScheduleHazardRecognizer::NoopHazard.

PreEmitNoops()

PreEmitNoopsCommon()

Definition at line 322 of file GCNHazardRecognizer.cpp.

References isDivFMas(), llvm::SIInstrInfo::isDPP(), llvm::SIInstrInfo::isDS(), llvm::SIInstrInfo::isEXP(), isLdsDma(), llvm::SIInstrInfo::isMAI(), isPermlane(), isRFE(), isRWLane(), isSendMsgTraceDataOrGDS(), isSGetReg(), isSMovRel(), llvm::SIInstrInfo::isSMRD(), isSSetReg(), llvm::SIInstrInfo::isVALU(), llvm::SIInstrInfo::isVMEM(), and MI.

Referenced by PreEmitNoops().

RecedeCycle()

void GCNHazardRecognizer::RecedeCycle ( ) overridevirtual

Reset()

void GCNHazardRecognizer::Reset ( ) overridevirtual

ShouldPreferAnother()

bool GCNHazardRecognizer::ShouldPreferAnother ( SUnit * ) overridevirtual

The documentation for this class was generated from the following files: