LLVM  14.0.0git
Classes | Namespaces | Macros | Functions | Variables
CalledValuePropagation.cpp File Reference
#include "llvm/Transforms/IPO/CalledValuePropagation.h"
#include "llvm/Analysis/SparsePropagation.h"
#include "llvm/Analysis/ValueLatticeUtils.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/IPO.h"
Include dependency graph for CalledValuePropagation.cpp:

Go to the source code of this file.

Classes

struct  llvm::LatticeKeyInfo< CVPLatticeKey >
 A specialization of LatticeKeyInfo for CVPLatticeKeys. More...
 

Namespaces

 llvm
 ---------------------— PointerInfo ------------------------------------—
 

Macros

#define DEBUG_TYPE   "called-value-propagation"
 

Functions

static bool runCVP (Module &M)
 
 INITIALIZE_PASS (CalledValuePropagationLegacyPass, "called-value-propagation", "Called Value Propagation", false, false) ModulePass *llvm
 

Variables

static cl::opt< unsigned > MaxFunctionsPerValue ("cvp-max-functions-per-value", cl::Hidden, cl::init(4), cl::desc("The maximum number of functions to track per lattice value"))
 The maximum number of functions to track per lattice value. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "called-value-propagation"

Definition at line 28 of file CalledValuePropagation.cpp.

Function Documentation

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( CalledValuePropagationLegacyPass  ,
"called-value-propagation ,
"Called Value Propagation ,
false  ,
false   
)

Definition at line 429 of file CalledValuePropagation.cpp.

◆ runCVP()

static bool runCVP ( Module M)
static

Variable Documentation

◆ MaxFunctionsPerValue

cl::opt<unsigned> MaxFunctionsPerValue("cvp-max-functions-per-value", cl::Hidden, cl::init(4), cl::desc("The maximum number of functions to track per lattice value"))
static

The maximum number of functions to track per lattice value.

Once the number of functions a call site can possibly target exceeds this threshold, it's lattice value becomes overdefined. The number of possible lattice values is bounded by Ch(F, M), where F is the number of functions in the module and M is MaxFunctionsPerValue. As such, this value should be kept very small. We likely can't do anything useful for call sites with a large number of possible targets, anyway.