LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::ModuloSchedule Class Reference

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. More...
 
MachineLoopgetLoop () const
 Return the single-block loop being scheduled. More...
 
int getNumStages () const
 Return the number of stages contained in this schedule, which is the largest stage index + 1. More...
 
int getFirstCycle ()
 Return the first cycle in the schedule, which is the cycle index of the first instruction. More...
 
int getFinalCycle ()
 Return the final cycle in the schedule, which is the cycle index of the last instruction. More...
 
int getStage (MachineInstr *MI)
 Return the stage that MI is scheduled in, or -1. More...
 
int getCycle (MachineInstr *MI)
 Return the cycle that MI is scheduled at, or -1. More...
 
ArrayRef< MachineInstr * > getInstructions ()
 Return the rescheduled instructions in order. More...
 
void dump ()
 
void print (raw_ostream &OS)
 

Detailed Description

Represents a schedule for a single-block loop.

For every instruction we maintain a Cycle and Stage.

Definition at line 78 of file ModuloSchedule.h.

Constructor & Destructor Documentation

◆ ModuloSchedule()

llvm::ModuloSchedule::ModuloSchedule ( MachineFunction MF,
MachineLoop Loop,
std::vector< MachineInstr *>  ScheduledInstrs,
DenseMap< MachineInstr *, int >  Cycle,
DenseMap< MachineInstr *, int >  Stage 
)
inline

Create a new ModuloSchedule.

  • ScheduledInstrs The new loop instructions, in total resequenced order.
  • Cycle Cycle index for all instructions in ScheduledInstrs. Cycle does not need to start at zero. ScheduledInstrs must be partially ordered by Cycle.
  • Stage Stage index for all instructions in ScheduleInstrs.

Definition at line 105 of file ModuloSchedule.h.

References llvm::max().

Member Function Documentation

◆ dump()

void llvm::ModuloSchedule::dump ( )
inline

Definition at line 147 of file ModuloSchedule.h.

References llvm::dbgs(), and print().

◆ getCycle()

int llvm::ModuloSchedule::getCycle ( MachineInstr MI)
inline

◆ getFinalCycle()

int llvm::ModuloSchedule::getFinalCycle ( )
inline

Return the final cycle in the schedule, which is the cycle index of the last instruction.

Definition at line 130 of file ModuloSchedule.h.

◆ getFirstCycle()

int llvm::ModuloSchedule::getFirstCycle ( )
inline

Return the first cycle in the schedule, which is the cycle index of the first instruction.

Definition at line 126 of file ModuloSchedule.h.

◆ getInstructions()

ArrayRef<MachineInstr *> llvm::ModuloSchedule::getInstructions ( )
inline

Return the rescheduled instructions in order.

Definition at line 145 of file ModuloSchedule.h.

Referenced by llvm::ModuloScheduleTestAnnotater::annotate().

◆ getLoop()

MachineLoop* llvm::ModuloSchedule::getLoop ( ) const
inline

Return the single-block loop being scheduled.

Definition at line 118 of file ModuloSchedule.h.

◆ getNumStages()

int llvm::ModuloSchedule::getNumStages ( ) const
inline

Return the number of stages contained in this schedule, which is the largest stage index + 1.

Definition at line 122 of file ModuloSchedule.h.

◆ getStage()

int llvm::ModuloSchedule::getStage ( MachineInstr MI)
inline

◆ print()

void ModuloSchedule::print ( raw_ostream OS)

Definition at line 24 of file ModuloSchedule.cpp.

References getCycle(), getStage(), and MI.

Referenced by dump().


The documentation for this class was generated from the following files: