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

Go to the source code of this file.

Classes

struct  llvm::SortByDFSIn
 
class  llvm::InsnInfo
 
class  llvm::LoadInfo
 
class  llvm::StoreInfo
 
class  llvm::CallInfo
 
class  llvm::GVNHoist
 
class  llvm::GVNHoistLegacyPass
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define DEBUG_TYPE   "gvn-hoist"
 

Typedefs

typedef DenseMap< std::pair
< unsigned, unsigned >
, SmallVector< Instruction *, 4 > > 
llvm::VNtoInsns
 
typedef DenseMap< const
BasicBlock *, bool > 
llvm::BBSideEffectsSet
 
typedef SmallVector
< Instruction *, 4 > 
llvm::SmallVecInsn
 
typedef SmallVectorImpl
< Instruction * > 
llvm::SmallVecImplInsn
 

Enumerations

enum  : unsigned { llvm::InvalidVN = ~2U }
 

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")
 
static void llvm::combineKnownMetadata (Instruction *ReplInst, Instruction *I)
 
 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 57 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 1042 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 1042 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

Referenced by llvm::GVNHoist::run().

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