21#ifndef LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_SCHEDULER_H
22#define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_SCHEDULER_H
45 std::priority_queue<DGNode *, std::vector<DGNode *>,
PriorityCmp> List;
51 auto *Back =
List.top();
79 for (
auto *
N : this->Nodes)
80 N->setSchedBundle(*
this);
87 for (
auto *
N : this->Nodes)
88 N->clearSchedBundle();
114 std::optional<BasicBlock::iterator> ScheduleTopItOpt;
126 void scheduleAndUpdateReadyList(
SchedBundle &Bndl);
128 enum class BndlSchedState {
130 PartiallyOrDifferentlyScheduled,
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
iterator erase(const_iterator CI)
This class implements an extremely fast bulk output stream that can only output to a stream.
Iterator for Instructions in a `BasicBlock.
A DependencyGraph Node that points to an Instruction and contains memory dependency edges.
Instruction * getInstruction() const
bool comesBefore(const Instruction *Other) const
Given an instruction Other in the same basic block as this instruction, return true if this instructi...
bool operator()(const DGNode *N1, const DGNode *N2)
The list holding nodes that are ready to schedule. Used by the scheduler.
LLVM_DUMP_METHOD void dump() const
The nodes that need to be scheduled back-to-back in a single scheduling cycle form a SchedBundle.
DGNode * getBot() const
\Returns the bundle node that comes after the others in program order.
SchedBundle(ContainerTy &&Nodes)
SchedBundle & operator=(const SchedBundle &Other)=delete
Copy Assignment (unimplemented).
DGNode * getTop() const
\Returns the bundle node that comes before the others in program order.
const_iterator begin() const
LLVM_DUMP_METHOD void dump() const
SchedBundle(const SchedBundle &Other)=delete
Copy CTOR (unimplemented).
const_iterator end() const
void cluster(BasicBlock::iterator Where)
Move all bundle instructions to Where back-to-back.
LLVM_DUMP_METHOD void dump() const
bool trySchedule(ArrayRef< Instruction * > Instrs)
Scheduler(AAResults &AA, Context &Ctx)
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.