LLVM 22.0.0git
|
#include "llvm/CodeGen/ModuloSchedule.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.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, Register &InitVal, Register &LoopVal) |
Return the register values for the operands of a Phi instruction. | |
static Register | getInitPhiReg (MachineInstr &Phi, MachineBasicBlock *LoopBB) |
Return the Phi register value that comes from the incoming block. | |
static Register | getLoopPhiReg (MachineInstr &Phi, MachineBasicBlock *LoopBB) |
Return the Phi register value that comes the loop block. | |
static void | replaceRegUsesAfterLoop (Register FromReg, Register ToReg, MachineBasicBlock *MBB, MachineRegisterInfo &MRI) |
Replace all uses of FromReg that appear outside the specified basic block with ToReg. | |
static bool | hasUseAfterLoop (Register Reg, MachineBasicBlock *BB, MachineRegisterInfo &MRI) |
Return true if the register has a use that occurs outside the specified loop. | |
static MachineBasicBlock * | createDedicatedExit (MachineBasicBlock *Loop, MachineBasicBlock *Exit, LiveIntervals &LIS) |
Create a dedicated exit for Loop. | |
static MachineInstr * | getLoopPhiUser (Register Reg, MachineBasicBlock *Loop) |
Return a phi if Reg is referenced by the phi. | |
static void | replacePhiSrc (MachineInstr &Phi, Register OrigReg, Register NewReg, MachineBasicBlock *NewMBB) |
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 | |
static cl::opt< bool > | SwapBranchTargetsMVE ("pipeliner-swap-branch-targets-mve", cl::Hidden, cl::init(false), cl::desc("Swap target blocks of a conditional branch for MVE expander")) |
modulo schedule | test |
modulo schedule Modulo Schedule test | pass |
modulo schedule Modulo Schedule test | false |
#define DEBUG_TYPE "pipeliner" |
Definition at line 23 of file ModuloSchedule.cpp.
|
static |
Create a dedicated exit for Loop.
Exit is the original exit for Loop. If it is already dedicated exit, return it. Otherwise, insert a new block between them and return the new block.
Definition at line 2125 of file ModuloSchedule.cpp.
References llvm::MachineBasicBlock::addSuccessor(), Cond, llvm::MachineFunction::CreateMachineBasicBlock(), llvm::dwarf_linker::DebugLoc, llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::insert(), llvm::LiveIntervals::insertMBBInMaps(), llvm_unreachable, TBB, and TII.
|
static |
Return the Phi register value that comes from the incoming block.
Definition at line 57 of file ModuloSchedule.cpp.
References Register.
|
static |
Return the Phi register value that comes the loop block.
Definition at line 65 of file ModuloSchedule.cpp.
References Register.
|
static |
Return a phi if Reg is referenced by the phi.
canApply() guarantees that at most only one such phi exists.
Definition at line 2378 of file ModuloSchedule.cpp.
References getPhiRegs(), and Reg.
|
static |
Return the register values for the operands of a Phi instruction.
This function assume the instruction is a Phi.
Definition at line 41 of file ModuloSchedule.cpp.
|
static |
Return true if the register has a use that occurs outside the specified loop.
Definition at line 360 of file ModuloSchedule.cpp.
INITIALIZE_PASS_BEGIN | ( | ModuloScheduleTest | , |
"modulo-schedule-test" | , | ||
"Modulo Schedule test pass" | , | ||
false | , | ||
false | ) |
References INITIALIZE_PASS_DEPENDENCY.
|
static |
Definition at line 2818 of file ModuloSchedule.cpp.
References llvm::dbgs(), llvm::getToken(), and llvm_unreachable.
|
static |
Definition at line 2466 of file ModuloSchedule.cpp.
|
static |
Replace all uses of FromReg that appear outside the specified basic block with ToReg.
Definition at line 349 of file ModuloSchedule.cpp.
References llvm::make_early_inc_range(), MBB, and MRI.
modulo schedule Modulo Schedule test false |
Definition at line 2805 of file ModuloSchedule.cpp.
modulo schedule Modulo Schedule test pass |
Definition at line 2805 of file ModuloSchedule.cpp.
|
static |
modulo schedule test |
Definition at line 2804 of file ModuloSchedule.cpp.
Referenced by llvm::SmallBitVector::anyCommon(), llvm::PPCRegisterInfo::isCallerPreservedPhysReg(), matchAliasCondition(), llvm::SmallBitVector::operator&=(), llvm::Bitset< AEK_NUM_EXTENSIONS >::operator<(), llvm::FeatureBitset::operator<(), llvm::detail::zip_longest_iterator< decltype(adl_begin(std::declval< Args >()))... >::operator==(), llvm::SmallBitVector::operator^=(), llvm::SmallBitVector::operator|=(), llvm::CoalescingBitVector< IndexT >::set(), llvm::SmallBitVector::test(), llvm::CoalescingBitVector< IndexT >::test_and_set(), llvm::SparseBitVector< 128 >::test_and_set(), and llvm::SparseBitVectorElement< ElementSize >::test_and_set().