LLVM  10.0.0svn
Macros | Functions | Variables
ModuloSchedule.cpp File Reference
#include "llvm/CodeGen/ModuloSchedule.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineLoopUtils.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for ModuloSchedule.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "pipeliner"
 

Functions

static void getPhiRegs (MachineInstr &Phi, MachineBasicBlock *Loop, unsigned &InitVal, unsigned &LoopVal)
 Return the register values for the operands of a Phi instruction. More...
 
static unsigned getInitPhiReg (MachineInstr &Phi, MachineBasicBlock *LoopBB)
 Return the Phi register value that comes from the incoming block. More...
 
static unsigned getLoopPhiReg (MachineInstr &Phi, MachineBasicBlock *LoopBB)
 Return the Phi register value that comes the loop block. More...
 
static void replaceRegUsesAfterLoop (unsigned FromReg, unsigned ToReg, MachineBasicBlock *MBB, MachineRegisterInfo &MRI, LiveIntervals &LIS)
 Replace all uses of FromReg that appear outside the specified basic block with ToReg. More...
 
static bool hasUseAfterLoop (unsigned Reg, MachineBasicBlock *BB, MachineRegisterInfo &MRI)
 Return true if the register has a use that occurs outside the specified loop. More...
 
static void removePhis (MachineBasicBlock *BB, MachineBasicBlock *Incoming)
 Remove the incoming block from the Phis in a basic block. More...
 
 INITIALIZE_PASS_BEGIN (ModuloScheduleTest, "modulo-schedule-test", "Modulo Schedule test pass", false, false) INITIALIZE_PASS_END(ModuloScheduleTest
 
static void parseSymbolString (StringRef S, int &Cycle, int &Stage)
 

Variables

modulo schedule test
 
modulo schedule Modulo Schedule test pass
 
modulo schedule Modulo Schedule test false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "pipeliner"

Definition at line 21 of file ModuloSchedule.cpp.

Function Documentation

◆ getInitPhiReg()

static unsigned getInitPhiReg ( MachineInstr Phi,
MachineBasicBlock LoopBB 
)
static

Return the Phi register value that comes from the incoming block.

Definition at line 51 of file ModuloSchedule.cpp.

References llvm::numbers::e, llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().

Referenced by hasUseAfterLoop().

◆ getLoopPhiReg()

static unsigned getLoopPhiReg ( MachineInstr Phi,
MachineBasicBlock LoopBB 
)
static

Return the Phi register value that comes the loop block.

Definition at line 59 of file ModuloSchedule.cpp.

References llvm::numbers::e, llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().

Referenced by hasUseAfterLoop().

◆ getPhiRegs()

static void getPhiRegs ( MachineInstr Phi,
MachineBasicBlock Loop,
unsigned InitVal,
unsigned LoopVal 
)
static

Return the register values for the operands of a Phi instruction.

This function assume the instruction is a Phi.

Definition at line 35 of file ModuloSchedule.cpp.

References assert(), llvm::numbers::e, llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and llvm::MachineInstr::isPHI().

Referenced by hasUseAfterLoop().

◆ hasUseAfterLoop()

static bool hasUseAfterLoop ( unsigned  Reg,
MachineBasicBlock BB,
MachineRegisterInfo MRI 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( ModuloScheduleTest  ,
"modulo-schedule-test ,
"Modulo Schedule test pass ,
false  ,
false   
)

◆ parseSymbolString()

static void parseSymbolString ( StringRef  S,
int &  Cycle,
int &  Stage 
)
static

◆ removePhis()

static void removePhis ( MachineBasicBlock BB,
MachineBasicBlock Incoming 
)
static

Remove the incoming block from the Phis in a basic block.

Definition at line 832 of file ModuloSchedule.cpp.

References assert(), llvm::numbers::e, MI, and llvm::SmallVectorBase::size().

◆ replaceRegUsesAfterLoop()

static void replaceRegUsesAfterLoop ( unsigned  FromReg,
unsigned  ToReg,
MachineBasicBlock MBB,
MachineRegisterInfo MRI,
LiveIntervals LIS 
)
static

Variable Documentation

◆ false

modulo schedule Modulo Schedule test false

Definition at line 1952 of file ModuloSchedule.cpp.

◆ pass

modulo schedule Modulo Schedule test pass

◆ test

modulo schedule test