LLVM API Documentation

JumpThreading.cpp File Reference

#include "llvm/Transforms/Scalar.h"
#include "llvm/IntrinsicInst.h"
#include "llvm/Pass.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/SmallPtrSet.h"

Include dependency graph for JumpThreading.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "jump-threading"

Functions

 STATISTIC (NumThreads,"Number of jumps threaded")
 STATISTIC (NumFolds,"Number of terminators folded")
FunctionPass * llvm::createJumpThreadingPass ()
static unsigned getJumpThreadDuplicationCost (const BasicBlock *BB)

Variables

static cl::opt< unsigned > Threshold ("jump-threading-threshold", cl::desc("Max block size to duplicate for jump threading"), cl::init(6), cl::Hidden)
static RegisterPass
< JumpThreading > 
X ("jump-threading","Jump Threading")


Define Documentation

#define DEBUG_TYPE   "jump-threading"

Definition at line 14 of file JumpThreading.cpp.


Function Documentation

static unsigned getJumpThreadDuplicationCost ( const BasicBlock *  BB  )  [static]

getJumpThreadDuplicationCost - Return the cost of duplicating this block to thread across it.

Ignore PHI nodes, these will be flattened when duplication happens.

Definition at line 146 of file JumpThreading.cpp.

References llvm::BasicBlock::getFirstNonPHI().

STATISTIC ( NumFolds  ,
"Number of terminators folded"   
)

STATISTIC ( NumThreads  ,
"Number of jumps threaded"   
)


Variable Documentation

char ID [static]

Definition at line 59 of file JumpThreading.cpp.

Definition at line 57 of file JumpThreading.cpp.

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

RegisterPass<JumpThreading> X("jump-threading","Jump Threading") [static]