|
LLVM 22.0.0git
|
An implementation of SourceMgr that allows users to add new instructions incrementally / dynamically. More...
#include "llvm/MCA/IncrementalSourceMgr.h"
Public Member Functions | |
| IncrementalSourceMgr ()=default | |
| IncrementalSourceMgr & | operator= (const IncrementalSourceMgr &)=delete |
| IncrementalSourceMgr (const IncrementalSourceMgr &)=delete | |
| void | clear () |
| void | setOnInstFreedCallback (InstFreedCallback CB) |
| Set a callback that is invoked when a mca::Instruction is no longer needed. | |
| ArrayRef< UniqueInst > | getInstructions () const override |
| Provides a fixed range of UniqueInst to iterate. | |
| bool | hasNext () const override |
| Whether there is any SourceRef to inspect / peek next. | |
| bool | isEnd () const override |
| Whether the instruction stream has eneded. | |
| SourceRef | peekNext () const override |
| The next SourceRef. | |
| void | addInst (UniqueInst &&Inst) |
| Add a new instruction. | |
| void | addRecycledInst (Instruction *Inst) |
| Add a recycled instruction. | |
| void | updateNext () override |
| Advance to the next SourceRef. | |
| void | endOfStream () |
| Mark the end of instruction stream. | |
| void | printStatistic (raw_ostream &OS) |
| Print statistic about instruction recycling stats. | |
| Public Member Functions inherited from llvm::mca::SourceMgr | |
| virtual size_t | size () const |
| (Fixed) Number of UniqueInst. | |
| virtual | ~SourceMgr ()=default |
Additional Inherited Members | |
| Public Types inherited from llvm::mca::SourceMgr | |
| using | UniqueInst = std::unique_ptr<Instruction> |
An implementation of SourceMgr that allows users to add new instructions incrementally / dynamically.
Note that this SourceMgr takes ownership of all mca::Instruction.
Definition at line 27 of file IncrementalSourceMgr.h.
|
default |
Referenced by IncrementalSourceMgr(), and operator=().
|
delete |
References clear(), and IncrementalSourceMgr().
|
inline |
Add a new instruction.
Definition at line 75 of file IncrementalSourceMgr.h.
|
inline |
Add a recycled instruction.
Definition at line 81 of file IncrementalSourceMgr.h.
| void IncrementalSourceMgr::clear | ( | ) |
Definition at line 22 of file IncrementalSourceMgr.cpp.
Referenced by IncrementalSourceMgr().
|
inline |
Mark the end of instruction stream.
Definition at line 86 of file IncrementalSourceMgr.h.
|
inlineoverridevirtual |
Provides a fixed range of UniqueInst to iterate.
Implements llvm::mca::SourceMgr.
Definition at line 62 of file IncrementalSourceMgr.h.
References llvm_unreachable.
|
inlineoverridevirtual |
Whether there is any SourceRef to inspect / peek next.
Note that returning false from this doesn't mean the instruction stream has ended.
Implements llvm::mca::SourceMgr.
Definition at line 66 of file IncrementalSourceMgr.h.
Referenced by peekNext().
|
inlineoverridevirtual |
Whether the instruction stream has eneded.
Implements llvm::mca::SourceMgr.
Definition at line 67 of file IncrementalSourceMgr.h.
|
delete |
References IncrementalSourceMgr().
|
inlineoverridevirtual |
The next SourceRef.
Implements llvm::mca::SourceMgr.
Definition at line 69 of file IncrementalSourceMgr.h.
| void IncrementalSourceMgr::printStatistic | ( | raw_ostream & | OS | ) |
Print statistic about instruction recycling stats.
Definition at line 40 of file IncrementalSourceMgr.cpp.
References llvm::format().
|
inline |
Set a callback that is invoked when a mca::Instruction is no longer needed.
This is usually used for recycling the instruction.
Definition at line 60 of file IncrementalSourceMgr.h.
|
overridevirtual |
Advance to the next SourceRef.
Implements llvm::mca::SourceMgr.
Definition at line 29 of file IncrementalSourceMgr.cpp.
References I.