LLVM 20.0.0git
|
Represents a schedule for a single-block loop. More...
#include "llvm/CodeGen/ModuloSchedule.h"
Public Member Functions | |
ModuloSchedule (MachineFunction &MF, MachineLoop *Loop, std::vector< MachineInstr * > ScheduledInstrs, DenseMap< MachineInstr *, int > Cycle, DenseMap< MachineInstr *, int > Stage) | |
Create a new ModuloSchedule. | |
MachineLoop * | getLoop () const |
Return the single-block loop being scheduled. | |
int | getNumStages () const |
Return the number of stages contained in this schedule, which is the largest stage index + 1. | |
int | getFirstCycle () |
Return the first cycle in the schedule, which is the cycle index of the first instruction. | |
int | getFinalCycle () |
Return the final cycle in the schedule, which is the cycle index of the last instruction. | |
int | getStage (MachineInstr *MI) |
Return the stage that MI is scheduled in, or -1. | |
int | getCycle (MachineInstr *MI) |
Return the cycle that MI is scheduled at, or -1. | |
void | setStage (MachineInstr *MI, int MIStage) |
Set the stage of a newly created instruction. | |
ArrayRef< MachineInstr * > | getInstructions () |
Return the rescheduled instructions in order. | |
void | dump () |
void | print (raw_ostream &OS) |
Represents a schedule for a single-block loop.
For every instruction we maintain a Cycle and Stage.
Definition at line 80 of file ModuloSchedule.h.
|
inline |
Create a new ModuloSchedule.
Definition at line 107 of file ModuloSchedule.h.
|
inline |
Definition at line 155 of file ModuloSchedule.h.
References llvm::dbgs(), and print().
Referenced by llvm::PeelingModuloScheduleExpander::expand(), and llvm::ModuloScheduleExpanderMVE::expand().
|
inline |
Return the cycle that MI is scheduled at, or -1.
Definition at line 141 of file ModuloSchedule.h.
Referenced by llvm::ModuloScheduleTestAnnotater::annotate(), and print().
|
inline |
Return the final cycle in the schedule, which is the cycle index of the last instruction.
Definition at line 132 of file ModuloSchedule.h.
|
inline |
Return the first cycle in the schedule, which is the cycle index of the first instruction.
Definition at line 128 of file ModuloSchedule.h.
|
inline |
Return the rescheduled instructions in order.
Definition at line 153 of file ModuloSchedule.h.
Referenced by llvm::ModuloScheduleTestAnnotater::annotate(), and llvm::ModuloScheduleExpander::expand().
|
inline |
Return the single-block loop being scheduled.
Definition at line 120 of file ModuloSchedule.h.
Referenced by llvm::ModuloScheduleExpander::expand(), llvm::PeelingModuloScheduleExpander::expand(), llvm::ModuloScheduleExpanderMVE::expand(), llvm::PeelingModuloScheduleExpander::rewriteKernel(), and llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander().
|
inline |
Return the number of stages contained in this schedule, which is the largest stage index + 1.
Definition at line 124 of file ModuloSchedule.h.
Referenced by llvm::PeelingModuloScheduleExpander::fixupBranches(), and llvm::PeelingModuloScheduleExpander::peelPrologAndEpilogs().
|
inline |
Return the stage that MI is scheduled in, or -1.
Definition at line 135 of file ModuloSchedule.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), I, and MI.
Referenced by llvm::ModuloScheduleTestAnnotater::annotate(), llvm::ModuloScheduleExpander::expand(), llvm::PeelingModuloScheduleExpander::getStage(), and print().
void ModuloSchedule::print | ( | raw_ostream & | OS | ) |
Definition at line 29 of file ModuloSchedule.cpp.
References getCycle(), getStage(), MI, and OS.
Referenced by dump(), and llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander().
|
inline |
Set the stage of a newly created instruction.
Definition at line 147 of file ModuloSchedule.h.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), and MI.