|
LLVM 24.0.0git
|
The scheduling point in the context of the Scheduler points to the top-of-schedule (i.e., the top-most instruction of the top bundle) during bottom-up scheduling or the bottom of the schedule (i.e., the bottom-most instruction of the bottom bundle) during top-down. More...
#include "llvm/Transforms/Vectorize/SandboxVectorizer/Scheduler.h"
Public Member Functions | |
| SchedulingPoint (BasicBlock::iterator It) | |
Creates a scheduling point pointing at It, meaning any instruction in a BB or BB.end(). | |
| BasicBlock * | atBeforeBeginOrNull () const |
| If the SchedulingPoint points to before the beginning of a BB, then this returns that BB, else returns nullptr. | |
| BasicBlock * | atEndOrNull () const |
| If the SchedulingPoint points after the last instruction in the BB then this returns the corresponding BasicBlock, nullptr otherwise. | |
| Instruction * | atInstrOrNull () const |
| Returns the instruction pointed to by this SchedulingPoint or null if we are before/after BB. | |
| operator Instruction * () const | |
| Cast to Instruction *. | |
| BasicBlock::iterator | getIterator () const |
| Returns the corresponding BB::iterator. | |
| operator BasicBlock::iterator () const | |
| SchedulingPoint | getNext () const |
| Returns the SchedulingPoint pointing after this. | |
| SchedulingPoint | getPrev () const |
| Returns the SchedulingPoint pointing before this. | |
| bool | operator== (const SchedulingPoint &Other) const |
| void | print (raw_ostream &OS) const |
| LLVM_DUMP_METHOD void | dump () const |
Static Public Member Functions | |
| static SchedulingPoint | createAt (BasicBlock::iterator It) |
Returns a SchedulingPoint that points to It. | |
| static SchedulingPoint | createBefore (BasicBlock::iterator It) |
Returns a SchedulingPoint that points to one element before It. | |
| static SchedulingPoint | createAfter (BasicBlock::iterator It) |
Returns a SchedulingPoint that points to one element after It. | |
The scheduling point in the context of the Scheduler points to the top-of-schedule (i.e., the top-most instruction of the top bundle) during bottom-up scheduling or the bottom of the schedule (i.e., the bottom-most instruction of the bottom bundle) during top-down.
This class can be thought of as an extended BB::iterator, one that can not only point to after the last instruction in a BB (i.e., BB.end()), but also before the first instruction (i.e., something equivalent to prev(BB.begin()), which is not a legal BasicBlock::iterator).
This is needed for symmetric implementations of top-down and bottom-up scheduling. More specifically, if this is the first scheduling attempt we need the scheduling front to still point to a hypothetical last scheduling point. In bottom-up this can be at BB.end() but in top-down this can be before BB.begin(). This is why a BasicBlock::iterator is not suitable for this.
Definition at line 190 of file Scheduler.h.
|
inline |
Creates a scheduling point pointing at It, meaning any instruction in a BB or BB.end().
Definition at line 202 of file Scheduler.h.
|
inline |
If the SchedulingPoint points to before the beginning of a BB, then this returns that BB, else returns nullptr.
Definition at line 222 of file Scheduler.h.
References llvm::sandboxir::BasicBlock().
Referenced by atInstrOrNull(), getIterator(), getNext(), getPrev(), and print().
|
inline |
If the SchedulingPoint points after the last instruction in the BB then this returns the corresponding BasicBlock, nullptr otherwise.
Definition at line 229 of file Scheduler.h.
References llvm::sandboxir::BasicBlock().
Referenced by atInstrOrNull(), getNext(), and print().
|
inline |
Returns the instruction pointed to by this SchedulingPoint or null if we are before/after BB.
Definition at line 237 of file Scheduler.h.
References atBeforeBeginOrNull(), and atEndOrNull().
Referenced by operator Instruction *(), and print().
|
inlinestatic |
Returns a SchedulingPoint that points to one element after It.
Definition at line 215 of file Scheduler.h.
References assert().
|
inlinestatic |
Returns a SchedulingPoint that points to It.
Definition at line 204 of file Scheduler.h.
|
inlinestatic |
Returns a SchedulingPoint that points to one element before It.
Definition at line 208 of file Scheduler.h.
References llvm::sandboxir::BasicBlock(), and llvm::BasicBlock::begin().
| void llvm::sandboxir::SchedulingPoint::dump | ( | ) | const |
Definition at line 89 of file Scheduler.cpp.
References llvm::dbgs(), and print().
|
inline |
Returns the corresponding BB::iterator.
Asserts that we are not pointing before BB begin.
Definition at line 247 of file Scheduler.h.
References assert(), and atBeforeBeginOrNull().
Referenced by getNext(), getPrev(), and operator BasicBlock::iterator().
|
inline |
Returns the SchedulingPoint pointing after this.
Definition at line 253 of file Scheduler.h.
References assert(), atBeforeBeginOrNull(), atEndOrNull(), llvm::sandboxir::BasicBlock(), llvm::BasicBlock::begin(), and getIterator().
Referenced by llvm::sandboxir::Scheduler::trySchedule().
|
inline |
Returns the SchedulingPoint pointing before this.
Definition at line 260 of file Scheduler.h.
References assert(), atBeforeBeginOrNull(), llvm::BasicBlock::begin(), and getIterator().
Referenced by llvm::sandboxir::Scheduler::trySchedule().
|
inline |
Definition at line 251 of file Scheduler.h.
References getIterator().
|
inline |
Cast to Instruction *.
Asserts that we are pointing to an instruction and not before/after the beginning/end of a BB.
Definition at line 244 of file Scheduler.h.
References atInstrOrNull().
|
inline |
Definition at line 268 of file Scheduler.h.
References llvm::Other.
| void llvm::sandboxir::SchedulingPoint::print | ( | raw_ostream & | OS | ) | const |
Definition at line 80 of file Scheduler.cpp.
References atBeforeBeginOrNull(), atEndOrNull(), atInstrOrNull(), and llvm::sandboxir::BasicBlock().
Referenced by dump().