LLVM: lib/Transforms/IPO/FunctionSpecialization.cpp File Reference (original) (raw)

Go to the source code of this file.

Namespaces
namespace llvm
This is an optimization pass for GlobalISel generic memory operations.
Macros
#define DEBUG_TYPE "function-specialization"
Functions
STATISTIC (NumSpecsCreated, "Number of specializations created")
static void removeSSACopy (Function &F)
static unsigned getCostValue (const Cost &C)
Get the unsigned Value of given Cost object.
static Function * cloneCandidateFunction (Function *F, unsigned NSpecs)
Clone the function F and remove the ssa_copy intrinsics added by the SCCPSolver in the cloned version.
Variables
static cl::opt< bool > llvm::ForceSpecialization ("force-specialization", cl::init(false), cl::Hidden, cl::desc("Force function specialization for every call site with a constant " "argument"))
static cl::opt< unsigned > llvm::MaxClones ("funcspec-max-clones", cl::init(3), cl::Hidden, cl::desc("The maximum number of clones allowed for a single function " "specialization"))
static cl::opt< unsigned > llvm::MaxDiscoveryIterations ("funcspec-max-discovery-iterations", cl::init(100), cl::Hidden, cl::desc("The maximum number of iterations allowed " "when searching for transitive " "phis"))
static cl::opt< unsigned > llvm::MaxIncomingPhiValues ("funcspec-max-incoming-phi-values", cl::init(8), cl::Hidden, cl::desc("The maximum number of incoming values a PHI node can have to be " "considered during the specialization bonus estimation"))
static cl::opt< unsigned > llvm::MaxBlockPredecessors ("funcspec-max-block-predecessors", cl::init(2), cl::Hidden, cl::desc("The maximum number of predecessors a basic block can have to be " "considered during the estimation of dead code"))
static cl::opt< unsigned > llvm::MinFunctionSize ("funcspec-min-function-size", cl::init(500), cl::Hidden, cl::desc("Don't specialize functions that have less than this number of " "instructions"))
static cl::opt< unsigned > llvm::MaxCodeSizeGrowth ("funcspec-max-codesize-growth", cl::init(3), cl::Hidden, cl::desc("Maximum codesize growth allowed per function"))
static cl::opt< unsigned > llvm::MinCodeSizeSavings ("funcspec-min-codesize-savings", cl::init(20), cl::Hidden, cl::desc("Reject specializations whose codesize savings are less than this " "much percent of the original function size"))
static cl::opt< unsigned > llvm::MinLatencySavings ("funcspec-min-latency-savings", cl::init(20), cl::Hidden, cl::desc("Reject specializations whose latency savings are less than this " "much percent of the original function size"))
static cl::opt< unsigned > llvm::MinInliningBonus ("funcspec-min-inlining-bonus", cl::init(300), cl::Hidden, cl::desc("Reject specializations whose inlining bonus is less than this " "much percent of the original function size"))
static cl::opt< bool > llvm::SpecializeOnAddress ("funcspec-on-address", cl::init(false), cl::Hidden, cl::desc("Enable function specialization on the address of global values"))
static cl::opt< bool > llvm::SpecializeLiteralConstant ("funcspec-for-literal-constant", cl::init(true), cl::Hidden, cl::desc("Enable specialization of functions that take a literal constant as an " "argument"))

DEBUG_TYPE

#define DEBUG_TYPE "function-specialization"

cloneCandidateFunction()

getCostValue()

removeSSACopy()

void removeSSACopy ( Function & F) static

STATISTIC()

STATISTIC ( NumSpecsCreated ,
"Number of specializations created" )