|
LLVM
10.0.0
|
#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/InitializePasses.h"#include "llvm/MC/MCContext.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/raw_ostream.h"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 |
| #define DEBUG_TYPE "pipeliner" |
Definition at line 22 of file ModuloSchedule.cpp.
|
static |
Return the Phi register value that comes from the incoming block.
Definition at line 52 of file ModuloSchedule.cpp.
References llvm::numbers::e, llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().
Referenced by hasUseAfterLoop().
|
static |
Return the Phi register value that comes the loop block.
Definition at line 60 of file ModuloSchedule.cpp.
References llvm::numbers::e, llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().
Referenced by hasUseAfterLoop().
|
static |
Return the register values for the operands of a Phi instruction.
This function assume the instruction is a Phi.
Definition at line 36 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().
|
static |
Return true if the register has a use that occurs outside the specified loop.
Definition at line 352 of file ModuloSchedule.cpp.
References llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::count(), llvm::tgtok::Def, llvm::numbers::e, E, llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDebugLoc(), llvm::MachineBasicBlock::getFirstNonPHI(), getInitPhiReg(), getLoopPhiReg(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), getPhiRegs(), llvm::MachineOperand::getReg(), I, llvm::MachineBasicBlock::instr_begin(), llvm::MachineBasicBlock::instr_end(), llvm::MachineOperand::isDef(), llvm::MachineInstr::isPHI(), llvm::Register::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::Register::isVirtualRegister(), llvm::make_range(), llvm::max(), MI, MRI, llvm::MachineBasicBlock::phis(), replaceRegUsesAfterLoop(), TII, TRI, llvm::MachineRegisterInfo::use_begin(), and llvm::MachineRegisterInfo::use_end().
|
static |
Definition at line 2127 of file ModuloSchedule.cpp.
References llvm::ModuloScheduleExpander::cleanup(), llvm::dbgs(), llvm::ModuloScheduleExpander::expand(), llvm::MachineInstr::getPostInstrSymbol(), llvm::getToken(), llvm::MachineLoop::getTopBlock(), llvm::MachineInstr::isTerminator(), llvm_unreachable, and MI.
|
static |
Remove the incoming block from the Phis in a basic block.
Definition at line 833 of file ModuloSchedule.cpp.
References assert(), llvm::numbers::e, MI, and llvm::SmallVectorBase::size().
|
static |
Replace all uses of FromReg that appear outside the specified basic block with ToReg.
Definition at line 334 of file ModuloSchedule.cpp.
References llvm::LiveIntervals::createEmptyInterval(), E, llvm::MachineOperand::getParent(), llvm::MachineInstr::getParent(), llvm::LiveIntervals::hasInterval(), I, llvm::RISCVFenceField::O, llvm::MachineOperand::setReg(), llvm::MachineRegisterInfo::use_begin(), and llvm::MachineRegisterInfo::use_end().
Referenced by hasUseAfterLoop().
| modulo schedule Modulo Schedule test false |
Definition at line 2113 of file ModuloSchedule.cpp.
| modulo schedule Modulo Schedule test pass |
Definition at line 2113 of file ModuloSchedule.cpp.
Referenced by LLVMTargetMachineEmit(), llvm::Spiller::postOptimization(), and llvm::verifySafepointIR().
| modulo schedule test |
Definition at line 2113 of file ModuloSchedule.cpp.
Referenced by CriticalPathStep(), llvm::detail::zip_shortest< Iters >::operator==(), and llvm::detail::zip_longest_iterator< Iters >::operator==().
1.8.13