9#ifndef LLVM_TRANSFORMS_IPO_INLINER_H
10#define LLVM_TRANSFORMS_IPO_INLINER_H
39 : OnlyMandatory(OnlyMandatory), LTOPhase(LTOPhase) {}
51 std::unique_ptr<InlineAdvisor> OwnedAdvisor;
52 const bool OnlyMandatory;
68 unsigned MaxDevirtIterations = 0);
This header provides classes for managing passes over SCCs of the call graph.
Implements a lazy call graph analysis and related passes for the new pass manager.
FunctionAnalysisManager FAM
ModuleAnalysisManager MAM
This header defines various interfaces for pass management in LLVM.
A container for analyses that lazily runs them and caches their results.
Interface for deciding whether to inline a call site or not.
The inliner pass for the new pass manager.
InlinerPass(bool OnlyMandatory=false, ThinOrFullLTOPhase LTOPhase=ThinOrFullLTOPhase::None)
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR)
InlinerPass(InlinerPass &&Arg)=default
An SCC of the call graph.
A lazily constructed view of the call graph of a module.
Module pass, wrapping the inliner pass.
void addModulePass(T Pass)
Add a module pass that runs before the CGSCC passes.
PreservedAnalyses run(Module &, ModuleAnalysisManager &)
CGSCCPassManager & getPM()
Allow adding more CGSCC passes, besides inlining.
void addLateModulePass(T Pass)
Add a module pass that runs after the CGSCC passes.
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
ModuleInlinerWrapperPass(ModuleInlinerWrapperPass &&Arg)=default
A Module instance is used to store all the information related to an LLVM module.
Result proxy object for OuterAnalysisManagerProxy.
LLVM_ATTRIBUTE_MINSIZE std::enable_if_t<!std::is_same_v< PassT, PassManager > > addPass(PassT &&Pass)
Pass interface - Implemented by all 'passes'.
A set of analyses that are preserved following a run of a transformation pass.
StringRef - Represent a constant reference to a string, i.e.
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
InliningAdvisorMode
There are 4 scenarios we can use the InlineAdvisor:
ThinOrFullLTOPhase
This enumerates the LLVM full LTO or ThinLTO optimization phases.
@ None
No LTO/ThinLTO behavior needed.
InlineParams getInlineParams()
Generate the parameters to tune the inline cost analysis based only on the commandline options.
cl::opt< unsigned > MaxDevirtIterations("max-devirt-iterations", cl::ReallyHidden, cl::init(4))
Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager...
Provides context on when an inline advisor is constructed in the pipeline (e.g., link phase,...
Thresholds to tune inline cost analysis.
A CRTP mix-in to automatically provide informational APIs needed for passes.