Go to the documentation of this file.
15 #ifndef LLVM_MCA_STAGES_STAGE_H
16 #define LLVM_MCA_STAGES_STAGE_H
28 Stage *NextInSequence;
29 std::set<HWEventListener *> Listeners;
35 const std::set<HWEventListener *> &
getListeners()
const {
return Listeners; }
38 Stage() : NextInSequence(nullptr) {}
61 assert(!NextInSequence &&
"This stage already has a NextInSequence!");
62 NextInSequence = NextStage;
82 template <
typename EventT>
void notifyEvent(
const EventT &Event)
const {
84 Listener->onEvent(Event);
100 #endif // LLVM_MCA_STAGES_STAGE_H
This is an optimization pass for GlobalISel generic memory operations.
void setNextInSequence(Stage *NextStage)
virtual bool isAvailable(const InstRef &IR) const
Returns true if it can execute IR during this cycle.
void addListener(HWEventListener *Listener)
Add a listener to receive callbacks during the execution of this stage.
void log(raw_ostream &OS) const override
Print an error message to an output stream.
This class implements an extremely fast bulk output stream that can only output to a stream.
Statically lint checks LLVM IR
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
Subclass of Error for the sole purpose of identifying the success path in the type system.
const std::set< HWEventListener * > & getListeners() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Base class for user error types.
An InstRef contains both a SourceMgr index and Instruction pair.
bool checkNextStage(const InstRef &IR) const
virtual Error cycleEnd()
Called once at the end of each cycle.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
virtual Error cycleResume()
Called after the pipeline is resumed from pausing state.
Lightweight error class with error context and mandatory checking.
virtual Error cycleStart()
Called once at the start of each cycle.
Error moveToTheNextStage(InstRef &IR)
Called when an instruction is ready to move the next pipeline stage.
This is actually not an error but a marker to indicate that the instruction stream is paused.
virtual Error execute(InstRef &IR)=0
The primary action that this stage performs on instruction IR.
virtual bool hasWorkToComplete() const =0
Returns true if some instructions are still executing this stage.
void notifyEvent(const EventT &Event) const
Notify listeners of a particular hardware event.
Optional< std::vector< StOtherPiece > > Other