26 #define DEBUG_TYPE "tailduplication" 34 TailDuplicateBase(
char &PassID,
bool PreRegAlloc)
45 class TailDuplicate :
public TailDuplicateBase {
48 TailDuplicate() : TailDuplicateBase(ID,
false) {
53 class EarlyTailDuplicate :
public TailDuplicateBase {
56 EarlyTailDuplicate() : TailDuplicateBase(ID,
true) {
71 "Early Tail Duplication",
false, false)
74 if (skipFunction(MF.getFunction()))
77 auto MBPI = &getAnalysis<MachineBranchProbabilityInfo>();
78 Duplicator.initMF(MF, PreRegAlloc, MBPI,
false);
80 bool MadeChange =
false;
81 while (Duplicator.tailDuplicateBlocks())
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This class represents lattice values for constants.
void initializeEarlyTailDuplicatePass(PassRegistry &)
AnalysisUsage & addRequired()
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
char & EarlyTailDuplicateID
Duplicate blocks with unconditional branches into tails of their predecessors.
INITIALIZE_PASS(EarlyTailDuplicate, "early-tailduplication", "Early Tail Duplication", false, false) bool TailDuplicateBase
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
char & TailDuplicateID
TailDuplicate - Duplicate blocks with unconditional branches into tails of their predecessors.
void initializeTailDuplicatePass(PassRegistry &)
Utility class to perform tail duplication.