Go to the documentation of this file.
23 #define DEBUG_TYPE "inline"
52 bool RemarksEnabled =
false;
57 RemarksEnabled =
true;
63 return ACT->getAssumptionCache(
F);
67 RemarksEnabled ? &ORE :
nullptr);
98 unsigned SizeOptLevel,
99 bool DisableInlineHotCallSite) {
101 if (DisableInlineHotCallSite)
102 Param.HotCallSiteThreshold = 0;
103 return new SimpleInliner(
Param);
107 return new SimpleInliner(Params);
111 TTIWP = &getAnalysis<TargetTransformInfoWrapperPass>();
115 void SimpleInliner::getAnalysisUsage(
AnalysisUsage &AU)
const {
This is an optimization pass for GlobalISel generic memory operations.
const BasicBlockListType & getBasicBlockList() const
Get the underlying elements of the Function...
Thresholds to tune inline cost analysis.
void initializeSimpleInlinerPass(PassRegistry &)
CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
InlineCost getInlineCost(CallBase &Call, const InlineParams &Params, TargetTransformInfo &CalleeTTI, function_ref< AssumptionCache &(Function &)> GetAssumptionCache, function_ref< const TargetLibraryInfo &(Function &)> GetTLI, function_ref< BlockFrequencyInfo &(Function &)> GetBFI=nullptr, ProfileSummaryInfo *PSI=nullptr, OptimizationRemarkEmitter *ORE=nullptr)
Get an InlineCost object representing the cost of inlining this callsite.
Function * getCalledFunction() const
Returns the function called, or null if this is an indirect function invocation or the function signa...
INITIALIZE_PASS_BEGIN(SimpleInliner, "inline", "Function Integration/Inlining", false, false) INITIALIZE_PASS_END(SimpleInliner
Represent the analysis usage information of a pass.
Represents the cost of inlining a function.
InlineParams getInlineParams()
Generate the parameters to tune the inline cost analysis based only on the commandline options.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Function * getCaller()
Helper to get the caller (the parent function).
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Pass * createFunctionInliningPass()
createFunctionInliningPass - Return a new pass object that uses a heuristic to inline direct function...
bool runOnSCC(CallGraphSCC &SCC) override
Main run interface method, this implements the interface required by the Pass class.
This class contains all of the helper code which is used to perform the inlining operations that do n...
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
The ModulePass which wraps up a CallGraph and the logic to build it.
An analysis pass based on legacy pass manager to deliver ProfileSummaryInfo.
print Print MemDeps of function
An immutable pass that tracks lazily created AssumptionCache objects.
A cache of @llvm.assume calls within a function.
amdgpu Simplify well known AMD library false FunctionCallee Callee
Pass interface - Implemented by all 'passes'.
Function Integration Inlining
void getAnalysisUsage(AnalysisUsage &Info) const override
For this class, we declare that we require and preserve the call graph.
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
AnalysisUsage & addRequired()