LLVM
10.0.0svn
|
The ModuloScheduleExpander takes a ModuloSchedule and expands it in-place, rewriting the old loop and inserting prologs and epilogs as required. More...
#include "llvm/CodeGen/ModuloSchedule.h"
Public Types | |
using | InstrChangesTy = DenseMap< MachineInstr *, std::pair< unsigned, int64_t > > |
Public Member Functions | |
ModuloScheduleExpander (MachineFunction &MF, ModuloSchedule &S, LiveIntervals &LIS, InstrChangesTy InstrChanges) | |
Create a new ModuloScheduleExpander. More... | |
void | expand () |
Performs the actual expansion. More... | |
void | cleanup () |
Performs final cleanup after expansion. More... | |
MachineBasicBlock * | getRewrittenKernel () |
Returns the newly rewritten kernel block, or nullptr if this was optimized away. More... | |
The ModuloScheduleExpander takes a ModuloSchedule and expands it in-place, rewriting the old loop and inserting prologs and epilogs as required.
Definition at line 153 of file ModuloSchedule.h.
using llvm::ModuloScheduleExpander::InstrChangesTy = DenseMap<MachineInstr *, std::pair<unsigned, int64_t> > |
Definition at line 155 of file ModuloSchedule.h.
|
inline |
Create a new ModuloScheduleExpander.
Definition at line 255 of file ModuloSchedule.h.
void ModuloScheduleExpander::cleanup | ( | ) |
Performs final cleanup after expansion.
Definition at line 181 of file ModuloSchedule.cpp.
References llvm::MachineBasicBlock::addSuccessor(), llvm::dbgs(), llvm::MachineBasicBlock::dump(), I, LLVM_DEBUG, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MachineBasicBlock::push_back(), llvm::HexagonInstrInfo::removeBranch(), llvm::MachineBasicBlock::replaceSuccessor(), TII, and llvm::MachineBasicBlock::transferSuccessors().
Referenced by parseSymbolString(), llvm::SwingSchedulerDAG::schedule(), and llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander().
void ModuloScheduleExpander::expand | ( | ) |
Performs the actual expansion.
Definition at line 66 of file ModuloSchedule.cpp.
References llvm::HexagonInstrInfo::analyzeLoopForPipelining(), assert(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::dbgs(), llvm::numbers::e, E, llvm::MachineOperand::getParent(), llvm::MachineOperand::getReg(), I, llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), LLVM_DEBUG, llvm::max(), MI, MRI, llvm::MachineBasicBlock::push_back(), Reg, llvm::MachineBasicBlock::replaceSuccessor(), TII, llvm::MachineBasicBlock::transferSuccessors(), and UseMI.
Referenced by parseSymbolString(), llvm::SwingSchedulerDAG::schedule(), and llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander().
|
inline |
Returns the newly rewritten kernel block, or nullptr if this was optimized away.
Definition at line 268 of file ModuloSchedule.h.
Referenced by llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander().