LLVM  3.7.0
Macros | Functions | Variables
LowerExpectIntrinsic.cpp File Reference
#include "llvm/Transforms/Scalar/LowerExpectIntrinsic.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Transforms/Scalar.h"
Include dependency graph for LowerExpectIntrinsic.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "lower-expect-intrinsic"
 

Functions

 STATISTIC (ExpectIntrinsicsHandled,"Number of 'expect' intrinsic instructions handled")
 
static bool handleSwitchExpect (SwitchInst &SI)
 
static bool handleBranchExpect (BranchInst &BI)
 
static bool lowerExpectIntrinsic (Function &F)
 
 INITIALIZE_PASS (LowerExpectIntrinsic,"lower-expect","Lower 'expect' Intrinsics", false, false) FunctionPass *llvm
 

Variables

static cl::opt< uint32_t > LikelyBranchWeight ("likely-branch-weight", cl::Hidden, cl::init(64), cl::desc("Weight of the branch likely to be taken (default = 64)"))
 
static cl::opt< uint32_t > UnlikelyBranchWeight ("unlikely-branch-weight", cl::Hidden, cl::init(4), cl::desc("Weight of the branch unlikely to be taken (default = 4)"))
 

Macro Definition Documentation

#define DEBUG_TYPE   "lower-expect-intrinsic"

Definition at line 32 of file LowerExpectIntrinsic.cpp.

Function Documentation

static bool handleBranchExpect ( BranchInst BI)
static
static bool handleSwitchExpect ( SwitchInst SI)
static
INITIALIZE_PASS ( LowerExpectIntrinsic  ,
"lower-expect"  ,
"Lower 'expect' Intrinsics"  ,
false  ,
false   
)

Definition at line 187 of file LowerExpectIntrinsic.cpp.

static bool lowerExpectIntrinsic ( Function F)
static
STATISTIC ( ExpectIntrinsicsHandled  ,
"Number of 'expect' intrinsic instructions handled"   
)

Variable Documentation

cl::opt<uint32_t> LikelyBranchWeight("likely-branch-weight", cl::Hidden, cl::init(64), cl::desc("Weight of the branch likely to be taken (default = 64)"))
static
cl::opt<uint32_t> UnlikelyBranchWeight("unlikely-branch-weight", cl::Hidden, cl::init(4), cl::desc("Weight of the branch unlikely to be taken (default = 4)"))
static