LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TailDuplication.cpp File Reference

#include "llvm/Transforms/Scalar.h"
#include "llvm/Constant.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/IntrinsicInst.h"
#include "llvm/Pass.h"
#include "llvm/Type.h"
#include "llvm/Support/CFG.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/Statistic.h"

Include dependency graph for TailDuplication.cpp:

Go to the source code of this file.

Functions

FunctionPassllvm::createTailDuplicationPass ()
static BasicBlockFindObviousSharedDomOf (BasicBlock *SrcBlock, BasicBlock *DstBlock)


Function Documentation

static BasicBlock* FindObviousSharedDomOf BasicBlock SrcBlock,
BasicBlock DstBlock
[static]
 

FindObviousSharedDomOf - We know there is a branch from SrcBlock to DestBlock, and that SrcBlock is not the only predecessor of DstBlock. If we can find a predecessor of SrcBlock that is a dominator of both SrcBlock and DstBlock, return it.

Definition at line 137 of file TailDuplication.cpp.

References llvm::pred_begin(), and llvm::pred_end().


Variable Documentation

Statistic NumEliminated("tailduplicate","Number of unconditional branches eliminated") [static]
 

Statistic NumPHINodes("tailduplicate","Number of phi nodes inserted") [static]
 

cl::opt<unsigned> Threshold("taildup-threshold", cl::desc("Max block size to tail duplicate"), cl::init(6), cl::Hidden) [static]
 

RegisterOpt<TailDup> X("tailduplicate","Tail Duplication") [static]