LLVM 20.0.0git
|
#include "llvm/MCA/Stages/Stage.h"
Public Member Functions | |
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. | |
Protected Member Functions | |
const std::set< HWEventListener * > & | getListeners () const |
|
default |
|
virtualdefault |
void llvm::mca::Stage::addListener | ( | HWEventListener * | Listener | ) |
Definition at line 65 of file Stage.h.
References IR, and isAvailable().
Referenced by llvm::mca::EntryStage::isAvailable(), and moveToTheNextStage().
|
inlinevirtual |
Called once at the end of each cycle.
Reimplemented in llvm::mca::EntryStage, llvm::mca::ExecuteStage, llvm::mca::InOrderIssueStage, llvm::mca::MicroOpQueueStage, and llvm::mca::RetireStage.
|
inlinevirtual |
Called after the pipeline is resumed from pausing state.
Reimplemented in llvm::mca::EntryStage.
|
inlinevirtual |
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 in llvm::mca::DispatchStage, llvm::mca::EntryStage, llvm::mca::ExecuteStage, llvm::mca::InOrderIssueStage, llvm::mca::MicroOpQueueStage, and llvm::mca::RetireStage.
The primary action that this stage performs on instruction IR.
Implemented in llvm::mca::DispatchStage, llvm::mca::EntryStage, llvm::mca::ExecuteStage, llvm::mca::InOrderIssueStage, llvm::mca::InstructionTables, llvm::mca::MicroOpQueueStage, and llvm::mca::RetireStage.
Referenced by moveToTheNextStage().
|
inlineprotected |
Definition at line 35 of file Stage.h.
Referenced by llvm::mca::ExecuteStage::notifyReservedOrReleasedBuffers(), and llvm::mca::ExecuteStage::notifyResourceAvailable().
|
pure virtual |
Returns true if some instructions are still executing this stage.
Implemented in llvm::mca::DispatchStage, llvm::mca::EntryStage, llvm::mca::ExecuteStage, llvm::mca::InOrderIssueStage, llvm::mca::InstructionTables, llvm::mca::MicroOpQueueStage, and llvm::mca::RetireStage.
Returns true if it can execute IR during this cycle.
Reimplemented in llvm::mca::InOrderIssueStage, llvm::mca::DispatchStage, llvm::mca::EntryStage, llvm::mca::ExecuteStage, and llvm::mca::MicroOpQueueStage.
Definition at line 42 of file Stage.h.
Referenced by checkNextStage().
Called when an instruction is ready to move the next pipeline stage.
Stages are responsible for moving instructions to their immediate successor stages.
Definition at line 73 of file Stage.h.
References assert(), checkNextStage(), execute(), and IR.
Referenced by llvm::mca::ExecuteStage::cycleStart(), and llvm::mca::EntryStage::execute().
|
inline |
Notify listeners of a particular hardware event.
Definition at line 82 of file Stage.h.
Referenced by llvm::mca::ExecuteStage::cycleEnd().
|
inline |