LLVM  4.0.0
Macros | Enumerations | Functions | Variables
GVNHoist.cpp File Reference
#include "llvm/Transforms/Scalar/GVN.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/MemorySSA.h"
Include dependency graph for GVNHoist.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "gvn-hoist"
 

Enumerations

enum  : unsigned
 

Functions

 STATISTIC (NumHoisted,"Number of instructions hoisted")
 
 STATISTIC (NumRemoved,"Number of instructions removed")
 
 STATISTIC (NumLoadsHoisted,"Number of loads hoisted")
 
 STATISTIC (NumLoadsRemoved,"Number of loads removed")
 
 STATISTIC (NumStoresHoisted,"Number of stores hoisted")
 
 STATISTIC (NumStoresRemoved,"Number of stores removed")
 
 STATISTIC (NumCallsHoisted,"Number of calls hoisted")
 
 STATISTIC (NumCallsRemoved,"Number of calls removed")
 
 INITIALIZE_PASS_BEGIN (GVNHoistLegacyPass,"gvn-hoist","Early GVN Hoisting of Expressions", false, false) INITIALIZE_PASS_END(GVNHoistLegacyPass
 

Variables

static cl::opt< int > MaxHoistedThreshold ("gvn-max-hoisted", cl::Hidden, cl::init(-1), cl::desc("Max number of instructions to hoist ""(default unlimited = -1)"))
 
static cl::opt< int > MaxNumberOfBBSInPath ("gvn-hoist-max-bbs", cl::Hidden, cl::init(4), cl::desc("Max number of basic blocks on the path between ""hoisting locations (default = 4, unlimited = -1)"))
 
static cl::opt< int > MaxDepthInBB ("gvn-hoist-max-depth", cl::Hidden, cl::init(100), cl::desc("Hoist instructions from the beginning of the BB up to the ""maximum specified depth (default = 100, unlimited = -1)"))
 
static cl::opt< int > MaxChainLength ("gvn-hoist-max-chain-length", cl::Hidden, cl::init(10), cl::desc("Maximum length of dependent chains to hoist ""(default = 10, unlimited = -1)"))
 
gvn hoist
 When an instruction is found to only use loop invariant operands that is safe to hoist, this instruction is called to do the dirty work. More...
 
gvn Early GVN Hoisting of Expressions
 
gvn Early GVN Hoisting of false
 

Macro Definition Documentation

#define DEBUG_TYPE   "gvn-hoist"

Definition at line 33 of file GVNHoist.cpp.

Enumeration Type Documentation

anonymous enum : unsigned

Definition at line 102 of file GVNHoist.cpp.

Function Documentation

INITIALIZE_PASS_BEGIN ( GVNHoistLegacyPass  ,
"gvn-hoist ,
"Early GVN Hoisting of Expressions ,
false  ,
false   
)
STATISTIC ( NumHoisted  ,
"Number of instructions hoisted"   
)
STATISTIC ( NumRemoved  ,
"Number of instructions removed"   
)
STATISTIC ( NumLoadsHoisted  ,
"Number of loads hoisted"   
)
STATISTIC ( NumLoadsRemoved  ,
"Number of loads removed"   
)
STATISTIC ( NumStoresHoisted  ,
"Number of stores hoisted"   
)
STATISTIC ( NumStoresRemoved  ,
"Number of stores removed"   
)
STATISTIC ( NumCallsHoisted  ,
"Number of calls hoisted"   
)
STATISTIC ( NumCallsRemoved  ,
"Number of calls removed"   
)

Variable Documentation

gvn Early GVN Hoisting of Expressions
gvn Early GVN Hoisting of false

Definition at line 998 of file GVNHoist.cpp.

static bool hoist

When an instruction is found to only use loop invariant operands that is safe to hoist, this instruction is called to do the dirty work.

Definition at line 998 of file GVNHoist.cpp.

cl::opt<int> MaxChainLength("gvn-hoist-max-chain-length", cl::Hidden, cl::init(10), cl::desc("Maximum length of dependent chains to hoist ""(default = 10, unlimited = -1)"))
static
cl::opt<int> MaxDepthInBB("gvn-hoist-max-depth", cl::Hidden, cl::init(100), cl::desc("Hoist instructions from the beginning of the BB up to the ""maximum specified depth (default = 100, unlimited = -1)"))
static
cl::opt<int> MaxHoistedThreshold("gvn-max-hoisted", cl::Hidden, cl::init(-1), cl::desc("Max number of instructions to hoist ""(default unlimited = -1)"))
static
cl::opt<int> MaxNumberOfBBSInPath("gvn-hoist-max-bbs", cl::Hidden, cl::init(4), cl::desc("Max number of basic blocks on the path between ""hoisting locations (default = 4, unlimited = -1)"))
static