LLVM 20.0.0git
|
#include "llvm/MCA/Stages/ExecuteStage.h"
Public Member Functions | |
ExecuteStage (Scheduler &S) | |
ExecuteStage (Scheduler &S, bool ShouldPerformBottleneckAnalysis) | |
bool | hasWorkToComplete () const override |
Returns true if some instructions are still executing this stage. | |
bool | isAvailable (const InstRef &IR) const override |
Returns true if it can execute IR during this cycle. | |
Error | cycleStart () override |
Called once at the start of each cycle. | |
Error | cycleEnd () override |
Called once at the end of each cycle. | |
Error | execute (InstRef &IR) override |
The primary action that this stage performs on instruction IR. | |
void | notifyInstructionIssued (const InstRef &IR, MutableArrayRef< ResourceUse > Used) const |
void | notifyInstructionExecuted (const InstRef &IR) const |
void | notifyInstructionPending (const InstRef &IR) const |
void | notifyInstructionReady (const InstRef &IR) const |
void | notifyResourceAvailable (const ResourceRef &RR) const |
void | notifyReservedOrReleasedBuffers (const InstRef &IR, bool Reserved) const |
Public Member Functions inherited from llvm::mca::Stage | |
Stage ()=default | |
virtual | ~Stage () |
virtual bool | isAvailable (const InstRef &IR) const |
Returns true if it can execute IR during this cycle. | |
virtual bool | hasWorkToComplete () const =0 |
Returns true if some instructions are still executing this stage. | |
virtual Error | cycleStart () |
Called once at the start of each cycle. | |
virtual Error | cycleResume () |
Called after the pipeline is resumed from pausing state. | |
virtual Error | cycleEnd () |
Called once at the end of each cycle. | |
virtual Error | execute (InstRef &IR)=0 |
The primary action that this stage performs on instruction IR. | |
void | setNextInSequence (Stage *NextStage) |
bool | checkNextStage (const InstRef &IR) const |
Error | moveToTheNextStage (InstRef &IR) |
Called when an instruction is ready to move the next pipeline stage. | |
void | addListener (HWEventListener *Listener) |
Add a listener to receive callbacks during the execution of this stage. | |
template<typename EventT > | |
void | notifyEvent (const EventT &Event) const |
Notify listeners of a particular hardware event. | |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::mca::Stage | |
const std::set< HWEventListener * > & | getListeners () const |
Definition at line 28 of file ExecuteStage.h.
|
inline |
Definition at line 50 of file ExecuteStage.h.
|
inline |
Definition at line 51 of file ExecuteStage.h.
|
overridevirtual |
Called once at the end of each cycle.
Reimplemented from llvm::mca::Stage.
Definition at line 122 of file ExecuteStage.cpp.
References llvm::mca::Scheduler::analyzeDataDependencies(), llvm::mca::Scheduler::analyzeResourcePressure(), llvm::dbgs(), llvm::format_hex(), llvm::mca::Scheduler::hadTokenStall(), LLVM_DEBUG, llvm::mca::HWPressureEvent::MEMORY_DEPS, llvm::mca::Stage::notifyEvent(), llvm::mca::HWPressureEvent::REGISTER_DEPS, llvm::mca::HWPressureEvent::RESOURCES, and llvm::SmallVectorBase< Size_T >::size().
|
overridevirtual |
Called once at the start of each cycle.
This can be used as a setup phase to prepare for the executions during the cycle.
Reimplemented from llvm::mca::Stage.
Definition at line 93 of file ExecuteStage.cpp.
References llvm::mca::Scheduler::cycleEvent(), IR, llvm::mca::Stage::moveToTheNextStage(), notifyInstructionExecuted(), notifyInstructionPending(), notifyInstructionReady(), and notifyResourceAvailable().
The primary action that this stage performs on instruction IR.
Implements llvm::mca::Stage.
Definition at line 186 of file ExecuteStage.cpp.
References assert(), llvm::mca::Scheduler::dispatch(), llvm::mca::InstructionBase::getNumMicroOps(), llvm::mca::Scheduler::instructionCheck(), IR, isAvailable(), llvm::mca::Instruction::isPending(), llvm::mca::Scheduler::mustIssueImmediately(), notifyInstructionPending(), notifyInstructionReady(), and notifyReservedOrReleasedBuffers().
|
inlineoverridevirtual |
Returns true if some instructions are still executing this stage.
Implements llvm::mca::Stage.
Definition at line 61 of file ExecuteStage.h.
Returns true if it can execute IR during this cycle.
Reimplemented from llvm::mca::Stage.
Definition at line 43 of file ExecuteStage.cpp.
References IR, llvm::mca::Scheduler::isAvailable(), and llvm::mca::toHWStallEventType().
Referenced by execute().
Definition at line 227 of file ExecuteStage.cpp.
References llvm::dbgs(), llvm::mca::HWInstructionEvent::Executed, IR, and LLVM_DEBUG.
Referenced by cycleStart().
void llvm::mca::ExecuteStage::notifyInstructionIssued | ( | const InstRef & | IR, |
MutableArrayRef< ResourceUse > | Used | ||
) | const |
Definition at line 252 of file ExecuteStage.cpp.
References assert(), llvm::dbgs(), llvm::mca::Scheduler::getResourceID(), IR, and LLVM_DEBUG.
Definition at line 233 of file ExecuteStage.cpp.
References llvm::dbgs(), IR, LLVM_DEBUG, and llvm::mca::HWInstructionEvent::Pending.
Referenced by cycleStart(), and execute().
Definition at line 239 of file ExecuteStage.cpp.
References llvm::dbgs(), IR, LLVM_DEBUG, and llvm::mca::HWInstructionEvent::Ready.
Referenced by cycleStart(), and execute().
void llvm::mca::ExecuteStage::notifyReservedOrReleasedBuffers | ( | const InstRef & | IR, |
bool | Reserved | ||
) | const |
Definition at line 271 of file ExecuteStage.cpp.
References E, llvm::mca::Stage::getListeners(), llvm::mca::Scheduler::getResourceID(), I, IR, llvm::popcount(), llvm::Reserved, and llvm::SmallVectorBase< Size_T >::size().
Referenced by execute().
void llvm::mca::ExecuteStage::notifyResourceAvailable | ( | const ResourceRef & | RR | ) | const |
Definition at line 245 of file ExecuteStage.cpp.
References llvm::dbgs(), llvm::mca::Stage::getListeners(), and LLVM_DEBUG.
Referenced by cycleStart().