LLVM API Documentation
#include "llvm/CodeGen/Passes.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/MachineSSAUpdater.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "tailduplication" |
Typedefs | |
typedef std::vector< std::pair < MachineBasicBlock *, unsigned > > | AvailableValsTy |
Functions | |
STATISTIC (NumTails,"Number of tails duplicated") | |
STATISTIC (NumTailDups,"Number of tail duplicated blocks") | |
STATISTIC (NumInstrDups,"Additional instructions due to tail duplication") | |
STATISTIC (NumDeadBlocks,"Number of dead blocks removed") | |
STATISTIC (NumAddedPHIs,"Number of phis added") | |
INITIALIZE_PASS (TailDuplicatePass,"tailduplication","Tail Duplication", false, false) bool TailDuplicatePass | |
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, SmallPtrSet< MachineBasicBlock *, 8 > SuccsB) |
Variables | |
static cl::opt< unsigned > | TailDuplicateSize ("tail-dup-size", cl::desc("Maximum instructions to consider tail duplicating"), cl::init(2), 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) |
#define DEBUG_TYPE "tailduplication" |
Definition at line 37 of file TailDuplication.cpp.
typedef std::vector<std::pair<MachineBasicBlock*,unsigned> > AvailableValsTy |
Definition at line 59 of file TailDuplication.cpp.
static bool bothUsedInPHI | ( | const MachineBasicBlock & | A, |
SmallPtrSet< MachineBasicBlock *, 8 > | SuccsB | ||
) | [static] |
Definition at line 638 of file TailDuplication.cpp.
References llvm::MachineBasicBlock::begin(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::MachineBasicBlock::empty(), llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().
static unsigned getPHISrcRegOpIdx | ( | MachineInstr * | MI, |
MachineBasicBlock * | SrcBB | ||
) | [static] |
Definition at line 355 of file TailDuplication.cpp.
References llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), and llvm::MachineInstr::getOperand().
static void getRegsUsedByPHIs | ( | const MachineBasicBlock & | BB, |
DenseSet< unsigned > * | UsedByPhi | ||
) | [static] |
Definition at line 366 of file TailDuplication.cpp.
References llvm::DenseSet< ValueT, ValueInfoT >::insert(), and llvm::AArch64CC::MI.
INITIALIZE_PASS | ( | TailDuplicatePass | , |
"tailduplication" | , | ||
"Tail Duplication" | , | ||
false | , | ||
false | |||
) |
Definition at line 132 of file TailDuplication.cpp.
References llvm::HexagonInstrInfo::getRegisterInfo(), and TII.
static bool isDefLiveOut | ( | unsigned | Reg, |
MachineBasicBlock * | BB, | ||
const MachineRegisterInfo * | MRI | ||
) | [static] |
Definition at line 344 of file TailDuplication.cpp.
References llvm::MachineInstr::getParent(), llvm::MachineInstr::isDebugValue(), and llvm::MachineRegisterInfo::use_instructions().
STATISTIC | ( | NumTails | , |
"Number of tails duplicated" | |||
) |
STATISTIC | ( | NumTailDups | , |
"Number of tail duplicated blocks" | |||
) |
STATISTIC | ( | NumInstrDups | , |
"Additional instructions 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] |
Definition at line 162 of file TailDuplication.cpp.
References llvm::SetVector< T, Vector, Set >::begin(), llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), llvm::dbgs(), llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), llvm::MachineBasicBlock::getNumber(), I, llvm_unreachable, llvm::AArch64CC::MI, llvm::MachineBasicBlock::pred_begin(), and llvm::MachineBasicBlock::pred_end().
cl::opt<unsigned> TailDuplicateSize("tail-dup-size", cl::desc("Maximum instructions to consider tail duplicating"), cl::init(2), cl::Hidden) [static] |
cl::opt<unsigned> TailDupLimit("tail-dup-limit", cl::init(~0U), 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] |