Go to the source code of this file.
|
| STATISTIC (NumTails, "Number of tails duplicated") |
|
| STATISTIC (NumTailDups, "Number of tail duplicated blocks") |
|
| STATISTIC (NumTailDupAdded, "Number of instructions added due to tail duplication") |
|
| STATISTIC (NumTailDupRemoved, "Number of instructions removed due to tail duplication") |
|
| STATISTIC (NumDeadBlocks, "Number of dead blocks removed") |
|
| STATISTIC (NumAddedPHIs, "Number of phis added") |
|
static void | VerifyPHIs (MachineFunction &MF, bool CheckExtra) |
|
static bool | isDefLiveOut (unsigned Reg, MachineBasicBlock *BB, const MachineRegisterInfo *MRI) |
|
static unsigned | getPHISrcRegOpIdx (MachineInstr *MI, MachineBasicBlock *SrcBB) |
|
static void | getRegsUsedByPHIs (const MachineBasicBlock &BB, DenseSet< unsigned > *UsedByPhi) |
|
static bool | bothUsedInPHI (const MachineBasicBlock &A, const SmallPtrSet< MachineBasicBlock *, 8 > &SuccsB) |
|
|
static cl::opt< unsigned > | TailDuplicateSize ("tail-dup-size", cl::desc("Maximum instructions to consider tail duplicating"), cl::init(2), cl::Hidden) |
|
static cl::opt< unsigned > | TailDupIndirectBranchSize ("tail-dup-indirect-size", cl::desc("Maximum instructions to consider tail duplicating blocks that " "end with indirect branches."), cl::init(20), cl::Hidden) |
|
static cl::opt< bool > | TailDupVerify ("tail-dup-verify", cl::desc("Verify sanity of PHI instructions during taildup"), cl::init(false), cl::Hidden) |
|
static cl::opt< unsigned > | TailDupLimit ("tail-dup-limit", cl::init(~0U), cl::Hidden) |
|
◆ DEBUG_TYPE
#define DEBUG_TYPE "tailduplication" |
◆ bothUsedInPHI()
Definition at line 674 of file TailDuplicator.cpp.
References llvm::TargetInstrInfo::analyzeBranch(), assert(), llvm::MachineBasicBlock::begin(), llvm::SmallVectorImpl< T >::clear(), Copies, llvm::SmallPtrSetImpl< PtrType >::count(), llvm::dbgs(), llvm::SmallVectorBase::empty(), llvm::MachineBasicBlock::empty(), llvm::MachineBasicBlock::findBranchDebugLoc(), llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), llvm::MachineBasicBlock::hasEHPadSuccessor(), llvm::TargetInstrInfo::insertBranch(), llvm::MachineBasicBlock::isSuccessor(), LLVM_DEBUG, llvm::MachineBasicBlock::pred_begin(), llvm::MachineBasicBlock::pred_end(), llvm::MachineBasicBlock::predecessors(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::TargetInstrInfo::removeBranch(), llvm::MachineBasicBlock::removeSuccessor(), llvm::MachineBasicBlock::replaceSuccessor(), llvm::MachineBasicBlock::succ_begin(), llvm::MachineBasicBlock::succ_end(), llvm::MachineBasicBlock::succ_size(), and llvm::MachineBasicBlock::successors().
◆ getPHISrcRegOpIdx()
◆ getRegsUsedByPHIs()
Definition at line 310 of file TailDuplicator.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::TargetRegisterInfo::composeSubRegIndices(), llvm::MachineRegisterInfo::constrainRegClass(), Copies, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::TargetInstrInfo::duplicate(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::MachineBasicBlock::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::MachineInstr::eraseFromParent(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::MachineBasicBlock::findDebugLoc(), llvm::MCInstrInfo::get(), llvm::MachineOperand::getCFIIndex(), llvm::MachineInstr::getDebugLoc(), llvm::TargetRegisterInfo::getMatchingSuperRegClass(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), getPHISrcRegOpIdx(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineInstr::getRegClassConstraint(), llvm::MachineOperand::getSubReg(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::MachineInstr::isCFIInstruction(), llvm::MachineOperand::isDef(), isDefLiveOut(), llvm::MachineInstr::isPHI(), llvm::MachineOperand::isReg(), llvm::MachineBasicBlock::isSuccessor(), llvm::TargetRegisterInfo::isVirtualRegister(), MI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Reg, llvm::MachineInstr::RemoveOperand(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setMBB(), llvm::MachineOperand::setReg(), llvm::MachineRegisterInfo::setRegClass(), llvm::MachineOperand::setSubReg(), llvm::SmallVectorBase::size(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::size(), and VI.
Referenced by llvm::TailDuplicator::canTailDuplicate().
◆ isDefLiveOut()
◆ STATISTIC() [1/6]
STATISTIC |
( |
NumTails |
, |
|
|
"Number of tails duplicated" |
|
|
) |
| |
◆ STATISTIC() [2/6]
STATISTIC |
( |
NumTailDups |
, |
|
|
"Number of tail duplicated blocks" |
|
|
) |
| |
◆ STATISTIC() [3/6]
STATISTIC |
( |
NumTailDupAdded |
, |
|
|
"Number of instructions added due to tail duplication" |
|
|
) |
| |
◆ STATISTIC() [4/6]
STATISTIC |
( |
NumTailDupRemoved |
, |
|
|
"Number of instructions removed due to tail duplication" |
|
|
) |
| |
◆ STATISTIC() [5/6]
STATISTIC |
( |
NumDeadBlocks |
, |
|
|
"Number of dead blocks removed" |
|
|
) |
| |
◆ STATISTIC() [6/6]
STATISTIC |
( |
NumAddedPHIs |
, |
|
|
"Number of phis added" |
|
|
) |
| |
◆ VerifyPHIs()
Definition at line 96 of file TailDuplicator.cpp.
References llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), llvm::dbgs(), E, llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), llvm::MachineBasicBlock::getNumber(), I, llvm_unreachable, MI, llvm::MachineBasicBlock::pred_begin(), llvm::MachineBasicBlock::pred_end(), and llvm::printMBBReference().
Referenced by llvm::TailDuplicator::tailDuplicateBlocks().
◆ TailDupIndirectBranchSize
cl::opt<unsigned> TailDupIndirectBranchSize("tail-dup-indirect-size", cl::desc("Maximum instructions to consider tail duplicating blocks that " "end with indirect branches."), cl::init(20), cl::Hidden) |
|
static |
◆ TailDuplicateSize
cl::opt<unsigned> TailDuplicateSize("tail-dup-size", cl::desc("Maximum instructions to consider tail duplicating"), cl::init(2), cl::Hidden) |
|
static |
◆ TailDupLimit
cl::opt<unsigned> TailDupLimit("tail-dup-limit", cl::init(~0U), cl::Hidden) |
|
static |
◆ TailDupVerify