class ModuloSchedule

Declaration

class ModuloSchedule { /* full declaration omitted */ };

Description

Represents a schedule for a single-block loop. For every instruction we maintain a Cycle and Stage.

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:79

Member Variables

private llvm::MachineLoop* Loop
The block containing the loop instructions.
private std::vector<MachineInstr*> ScheduledInstrs
The instructions to be generated, in total order. Cycle provides a partial order; the total order within cycles has been decided by the schedule producer.
private DenseMap<llvm::MachineInstr*, int> Cycle
The cycle for each instruction.
private DenseMap<llvm::MachineInstr*, int> Stage
The stage for each instruction.
private int NumStages
The number of stages in this schedule (Max(Stage) + 1).

Method Overview

  • public ModuloSchedule(llvm::MachineFunction & MF, llvm::MachineLoop * Loop, std::vector<MachineInstr *> ScheduledInstrs, DenseMap<llvm::MachineInstr *, int> Cycle, DenseMap<llvm::MachineInstr *, int> Stage)
  • public void dump()
  • public int getCycle(llvm::MachineInstr * MI)
  • public int getFinalCycle()
  • public int getFirstCycle()
  • public ArrayRef<llvm::MachineInstr *> getInstructions()
  • public llvm::MachineLoop * getLoop() const
  • public int getNumStages() const
  • public int getStage(llvm::MachineInstr * MI)
  • public void print(llvm::raw_ostream & OS)
  • public void setStage(llvm::MachineInstr * MI, int MIStage)

Methods

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

Description

Create a new ModuloSchedule.

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:106

Parameters

llvm::MachineFunction& MF
llvm::MachineLoop* Loop
std::vector<MachineInstr*> ScheduledInstrs
DenseMap<llvm::MachineInstr*, int> Cycle
DenseMap<llvm::MachineInstr*, int> Stage

void dump()

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:154

int getCycle(llvm::MachineInstr* MI)

Description

Return the cycle that MI is scheduled at, or -1.

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:140

Parameters

llvm::MachineInstr* MI

int getFinalCycle()

Description

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

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:131

int getFirstCycle()

Description

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

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:127

ArrayRef<llvm::MachineInstr*> getInstructions()

Description

Return the rescheduled instructions in order.

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:152

llvm::MachineLoop* getLoop() const

Description

Return the single-block loop being scheduled.

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:119

int getNumStages() const

Description

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

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:123

int getStage(llvm::MachineInstr* MI)

Description

Return the stage that MI is scheduled in, or -1.

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:134

Parameters

llvm::MachineInstr* MI

void print(llvm::raw_ostream& OS)

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:155

Parameters

llvm::raw_ostream& OS

void setStage(llvm::MachineInstr* MI, int MIStage)

Description

Set the stage of a newly created instruction.

Declared at: llvm/include/llvm/CodeGen/ModuloSchedule.h:146

Parameters

llvm::MachineInstr* MI
int MIStage