LLVM  14.0.0git
Public Member Functions | List of all members
FunctionSpecializer Class Reference

Public Member Functions

 FunctionSpecializer (SCCPSolver &Solver, std::function< AssumptionCache &(Function &)> GetAC, std::function< TargetTransformInfo &(Function &)> GetTTI, std::function< TargetLibraryInfo &(Function &)> GetTLI)
 
bool specializeFunctions (SmallVectorImpl< Function * > &FuncDecls, SmallVectorImpl< Function * > &CurrentSpecializations)
 Attempt to specialize functions in the module to enable constant propagation across function boundaries. More...
 
bool tryToReplaceWithConstant (Value *V)
 

Detailed Description

Definition at line 232 of file FunctionSpecialization.cpp.

Constructor & Destructor Documentation

◆ FunctionSpecializer()

FunctionSpecializer::FunctionSpecializer ( SCCPSolver Solver,
std::function< AssumptionCache &(Function &)>  GetAC,
std::function< TargetTransformInfo &(Function &)>  GetTTI,
std::function< TargetLibraryInfo &(Function &)>  GetTLI 
)
inline

Definition at line 245 of file FunctionSpecialization.cpp.

Member Function Documentation

◆ specializeFunctions()

bool FunctionSpecializer::specializeFunctions ( SmallVectorImpl< Function * > &  FuncDecls,
SmallVectorImpl< Function * > &  CurrentSpecializations 
)
inline

Attempt to specialize functions in the module to enable constant propagation across function boundaries.

Returns
true if at least one function is specialized.

Definition at line 256 of file FunctionSpecialization.cpp.

References llvm::SCCPSolver::addArgumentTrackedFunction(), llvm::SCCPSolver::addTrackedFunction(), Arg, llvm::dbgs(), F, LLVM_DEBUG, llvm::SCCPSolver::markBlockExecutable(), and tryToReplaceWithConstant().

◆ tryToReplaceWithConstant()

bool FunctionSpecializer::tryToReplaceWithConstant ( Value V)
inline

The documentation for this class was generated from the following file: