LLVM 24.0.0git
FunctionSpecialization.cpp File Reference

Go to the source code of this file.

Classes

struct  llvm::DenseMapInfo< SpecSig >

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.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "function-specialization"

Definition at line 27 of file FunctionSpecialization.cpp.

Function Documentation

◆ cloneCandidateFunction()

Function * cloneCandidateFunction ( Function * F,
unsigned NSpecs )
static

Clone the function F and remove the ssa_copy intrinsics added by the SCCPSolver in the cloned version.

Definition at line 831 of file FunctionSpecialization.cpp.

References llvm::CloneFunction(), F, removeSSACopy(), and llvm::Value::setName().

◆ getCostValue()

unsigned getCostValue ( const Cost & C)
static

Get the unsigned Value of given Cost object.

Assumes the Cost is always non-negative, which is true for both TCK_CodeSize and TCK_Latency, and always Valid.

Definition at line 599 of file FunctionSpecialization.cpp.

References assert(), and C().

◆ removeSSACopy()

void removeSSACopy ( Function & F)
static

Definition at line 549 of file FunctionSpecialization.cpp.

References llvm::dyn_cast(), F, and llvm::make_early_inc_range().

Referenced by cloneCandidateFunction().

◆ STATISTIC()

STATISTIC ( NumSpecsCreated ,
"Number of specializations created"  )

References I, and Pred.