LLVM
8.0.1
|
#include "llvm/MCA/Stages/ExecuteStage.h"
Public Member Functions | |
ExecuteStage (Scheduler &S) | |
bool | hasWorkToComplete () const override |
Returns true if some instructions are still executing this stage. More... | |
bool | isAvailable (const InstRef &IR) const override |
Returns true if it can execute IR during this cycle. More... | |
Error | cycleStart () override |
Called once at the start of each cycle. More... | |
Error | execute (InstRef &IR) override |
The primary action that this stage performs on instruction IR. More... | |
void | notifyInstructionIssued (const InstRef &IR, MutableArrayRef< std::pair< ResourceRef, ResourceCycles >> Used) const |
void | notifyInstructionExecuted (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 () | |
virtual | ~Stage () |
virtual Error | cycleEnd () |
Called once at the end of each cycle. More... | |
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. More... | |
void | addListener (HWEventListener *Listener) |
Add a listener to receive callbacks during the execution of this stage. More... | |
template<typename EventT > | |
void | notifyEvent (const EventT &Event) const |
Notify listeners of a particular hardware event. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::mca::Stage | |
const std::set< HWEventListener * > & | getListeners () const |
Definition at line 29 of file ExecuteStage.h.
|
inline |
Definition at line 45 of file ExecuteStage.h.
|
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 87 of file ExecuteStage.cpp.
References llvm::mca::Scheduler::cycleEvent(), llvm::mca::Stage::moveToTheNextStage(), notifyInstructionExecuted(), notifyInstructionReady(), and notifyResourceAvailable().
Referenced by hasWorkToComplete().
The primary action that this stage performs on instruction IR.
Implements llvm::mca::Stage.
Definition at line 135 of file ExecuteStage.cpp.
References assert(), llvm::mca::Scheduler::dispatch(), llvm::mca::InstRef::getInstruction(), isAvailable(), llvm::mca::Instruction::isEliminated(), llvm::mca::Scheduler::isReady(), llvm::mca::Scheduler::mustIssueImmediately(), notifyInstructionReady(), notifyReservedOrReleasedBuffers(), and llvm::mca::Scheduler::sanityCheck().
Referenced by hasWorkToComplete().
|
inlineoverridevirtual |
Returns true if some instructions are still executing this stage.
Implements llvm::mca::Stage.
Definition at line 53 of file ExecuteStage.h.
References cycleStart(), execute(), isAvailable(), notifyInstructionExecuted(), notifyInstructionIssued(), notifyInstructionReady(), notifyReservedOrReleasedBuffers(), and notifyResourceAvailable().
Returns true if it can execute IR during this cycle.
Reimplemented from llvm::mca::Stage.
Definition at line 44 of file ExecuteStage.cpp.
References llvm::mca::InstRef::getInstruction(), I, IR, llvm::mca::Scheduler::isAvailable(), llvm::mca::Instruction::isExecuted(), llvm::mca::Scheduler::issueInstruction(), llvm::mca::Stage::moveToTheNextStage(), notifyInstructionExecuted(), notifyInstructionIssued(), notifyInstructionReady(), notifyReservedOrReleasedBuffers(), llvm::mca::Scheduler::select(), and llvm::mca::toHWStallEventType().
Referenced by execute(), and hasWorkToComplete().
Definition at line 167 of file ExecuteStage.cpp.
References llvm::dbgs(), llvm::mca::HWInstructionEvent::Executed, and LLVM_DEBUG.
Referenced by cycleStart(), hasWorkToComplete(), isAvailable(), and llvm::mca::verifyInstructionEliminated().
void llvm::mca::ExecuteStage::notifyInstructionIssued | ( | const InstRef & | IR, |
MutableArrayRef< std::pair< ResourceRef, ResourceCycles >> | Used | ||
) | const |
Definition at line 186 of file ExecuteStage.cpp.
References llvm::dbgs(), llvm::mca::Scheduler::getResourceID(), and LLVM_DEBUG.
Referenced by hasWorkToComplete(), isAvailable(), and llvm::mca::verifyInstructionEliminated().
Definition at line 173 of file ExecuteStage.cpp.
References llvm::dbgs(), LLVM_DEBUG, and llvm::mca::HWInstructionEvent::Ready.
Referenced by cycleStart(), execute(), hasWorkToComplete(), isAvailable(), and llvm::mca::verifyInstructionEliminated().
void llvm::mca::ExecuteStage::notifyReservedOrReleasedBuffers | ( | const InstRef & | IR, |
bool | Reserved | ||
) | const |
Definition at line 205 of file ExecuteStage.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::mca::InstrDesc::Buffers, llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::mca::InstructionBase::getDesc(), llvm::mca::InstRef::getInstruction(), llvm::mca::Stage::getListeners(), llvm::mca::Scheduler::getResourceID(), and llvm::transform().
Referenced by execute(), hasWorkToComplete(), and isAvailable().
void llvm::mca::ExecuteStage::notifyResourceAvailable | ( | const ResourceRef & | RR | ) | const |
Definition at line 179 of file ExecuteStage.cpp.
References llvm::dbgs(), llvm::mca::Stage::getListeners(), and LLVM_DEBUG.
Referenced by cycleStart(), and hasWorkToComplete().