74 #define DEBUG_TYPE "inline" 76 STATISTIC(NumInlined,
"Number of functions inlined");
77 STATISTIC(NumCallsDeleted,
"Number of call sites deleted, not inlined");
78 STATISTIC(NumDeleted,
"Number of functions deleted because all callers found");
79 STATISTIC(NumMergedAllocas,
"Number of allocas merged together");
84 STATISTIC(NumCallerCallersAnalyzed,
"Number of caller-callers analyzed");
108 "inliner-function-import-stats",
112 clEnumValN(InlinerFunctionImportStatsOpts::Verbose,
"verbose",
113 "printing of statistics for each inlined function")),
120 cl::desc(
"Enable adding inline-remark attribute to" 121 " callsites processed by inliner but decided" 122 " to be not inlined"));
179 if (InlineHistory != -1)
184 for (
unsigned AllocaNo = 0, e = IFI.
StaticAllocas.size(); AllocaNo != e;
196 std::vector<AllocaInst *> &AllocasForType = InlinedArrayAllocas[ATy];
203 bool MergedAwayAlloca =
false;
204 for (
AllocaInst *AvailableAlloca : AllocasForType) {
206 Align2 = AvailableAlloca->getAlignment();
210 if (AvailableAlloca->getParent() != AI->
getParent())
215 if (!UsedAllocas.
insert(AvailableAlloca).second)
221 <<
"\n\t\tINTO: " << *AvailableAlloca <<
'\n');
229 DDI->moveBefore(AvailableAlloca->getNextNode());
233 if (Align1 != Align2) {
234 if (!Align1 || !Align2) {
238 Align1 = Align1 ? Align1 : TypeAlign;
239 Align2 = Align2 ? Align2 : TypeAlign;
247 MergedAwayAlloca =
true;
254 if (MergedAwayAlloca)
262 AllocasForType.push_back(AI);
309 int &TotalSecondaryCost,
335 TotalSecondaryCost = 0;
337 int CandidateCost = IC.
getCost() - 1;
342 bool inliningPreventsSomeOuterInline =
false;
347 if (!ApplyLastCallBonus && TotalSecondaryCost >= IC.
getCost())
355 ApplyLastCallBonus =
false;
360 ++NumCallerCallersAnalyzed;
362 ApplyLastCallBonus =
false;
372 inliningPreventsSomeOuterInline =
true;
373 TotalSecondaryCost += IC2.
getCost();
380 if (ApplyLastCallBonus)
383 if (inliningPreventsSomeOuterInline && TotalSecondaryCost < IC.
getCost())
389 static std::basic_ostream<char> &operator<<(std::basic_ostream<char> &R,
394 template <
class RemarkT>
398 R <<
"(cost=always)";
406 R <<
": " <<
ore::NV(
"Reason", Reason);
440 <<
NV(
"Callee", Callee) <<
" not inlined into " 441 <<
NV(
"Caller", Caller) <<
" because it should never be inlined " 452 <<
NV(
"Callee", Callee) <<
" not inlined into " 453 <<
NV(
"Caller", Caller) <<
" because too costly to inline " << IC;
458 int TotalSecondaryCost = 0;
462 <<
", outer Cost = " << TotalSecondaryCost <<
'\n');
466 <<
"Not inlining. Cost of inlining " <<
NV(
"Callee", Callee)
467 <<
" increases the cost of inlining " <<
NV(
"Caller", Caller)
468 <<
" in other contexts";
486 while (InlineHistoryID != -1) {
487 assert(
unsigned(InlineHistoryID) < InlineHistory.size() &&
488 "Invalid inline history ID");
489 if (InlineHistory[InlineHistoryID].
first == F)
491 InlineHistoryID = InlineHistory[InlineHistoryID].second;
513 StringRef RemarkName = AlwaysInline ?
"AlwaysInline" :
"Inlined";
515 <<
ore::NV(
"Callee", &Callee) <<
" inlined into " 516 <<
ore::NV(
"Caller", &Caller) <<
" with " << IC;
521 if (!InlineRemarkAttribute)
567 if (!CS || isa<IntrinsicInst>(
I))
574 if (
Callee->isDeclaration()) {
580 <<
NV(
"Callee",
Callee) <<
" will not be inlined into " 582 <<
" because its definition is unavailable" 588 CallSites.
push_back(std::make_pair(CS, -1));
595 if (CallSites.
empty())
600 unsigned FirstCallInSCC = CallSites.
size();
601 for (
unsigned i = 0; i < FirstCallInSCC; ++i)
603 if (SCCFunctions.
count(
F))
604 std::swap(CallSites[i--], CallSites[--FirstCallInSCC]);
611 bool Changed =
false;
618 for (
unsigned CSi = 0; CSi != CallSites.
size(); ++CSi) {
633 if (!IsTriviallyDead) {
639 InlineHistoryID = CallSites[CSi].second;
640 if (InlineHistoryID != -1 &&
671 if (IsTriviallyDead) {
672 LLVM_DEBUG(
dbgs() <<
" -> Deleting dead call: " << *Instr <<
"\n");
675 CG[Caller]->removeCallEdgeFor(CS);
687 CS, InlineInfo, InlinedArrayAllocas, InlineHistoryID,
688 InsertLifetime, AARGetter, ImportedFunctionsStats);
694 <<
NV(
"Callee", Callee) <<
" will not be inlined into " 695 <<
NV(
"Caller", Caller) <<
": " <<
NV(
"Reason", IR.
message);
708 int NewHistoryID = InlineHistory.
size();
709 InlineHistory.
push_back(std::make_pair(Callee, InlineHistoryID));
720 !SCCFunctions.
count(Callee) &&
724 CG[Callee]->getNumReferences() == 0) {
730 CalleeNode->removeAllCalledFunctions();
741 if (SCC.isSingular()) {
742 CallSites[CSi] = CallSites.
back();
752 }
while (LocalChange);
758 CallGraph &CG = getAnalysis<CallGraphWrapperPass>().getCallGraph();
759 ACT = &getAnalysis<AssumptionCacheTracker>();
760 PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();
761 auto &TLI = getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
765 return inlineCallsImpl(SCC, CG, GetAssumptionCache, PSI, TLI, InsertLifetime,
775 InlinerFunctionImportStatsOpts::Verbose);
781 bool AlwaysInlineOnly) {
787 CGN->removeAllCalledFunctions();
800 for (
const auto &
I : CG) {
832 if (!DeadFunctionsInComdats.
empty()) {
836 for (
Function *
F : DeadFunctionsInComdats)
840 if (FunctionsToRemove.
empty())
851 FunctionsToRemove.
erase(
852 std::unique(FunctionsToRemove.
begin(), FunctionsToRemove.
end()),
853 FunctionsToRemove.
end());
855 delete CG.removeFunctionFromModule(CGN);
865 InlinerFunctionImportStatsOpts::Verbose);
874 bool Changed =
false;
876 assert(InitialC.size() > 0 &&
"Cannot handle an empty SCC!");
877 Module &M = *InitialC.begin()->getFunction().getParent();
883 llvm::make_unique<ImportedFunctionsInliningStatistics>();
918 for (
auto &
N : InitialC) {
929 if (!
Callee->isDeclaration())
931 else if (!isa<IntrinsicInst>(
I)) {
936 <<
NV(
"Callee",
Callee) <<
" will not be inlined into " 938 <<
" because its definition is unavailable" 949 auto *RC = &
C->getOuterRefSCC();
968 for (
int i = 0; i < (int)Calls.
size(); ++i) {
973 Function &
F = *Calls[i].first.getCaller();
998 std::function<AssumptionCache &(Function &)> GetAssumptionCache =
1006 auto GetInlineCost = [&](
CallSite CS) {
1009 return getInlineCost(CS, Params, CalleeTTI, GetAssumptionCache, {GetBFI},
1016 bool DidInline =
false;
1017 for (; i < (int)Calls.
size() && Calls[i].first.getCaller() == &
F; ++i) {
1018 int InlineHistoryID;
1020 std::tie(CS, InlineHistoryID) = Calls[i];
1023 if (InlineHistoryID != -1 &&
1036 LLVM_DEBUG(
dbgs() <<
"Skipping inlining internal SCC edge from a node " 1037 "previously split out of this SCC by inlining: " 1060 nullptr, &GetAssumptionCache, PSI,
1068 using namespace ore;
1075 <<
NV(
"Callee", &Callee) <<
" will not be inlined into " 1076 <<
NV(
"Caller", &F) <<
": " <<
NV(
"Reason", IR.
message);
1081 InlinedCallees.
insert(&Callee);
1089 int NewHistoryID = InlineHistory.
size();
1090 InlineHistory.
push_back({&Callee, InlineHistoryID});
1093 if (!NewCallee->isDeclaration())
1114 [&Callee](
const std::pair<CallSite, int> &Call) {
1115 return Call.first.getCaller() == &Callee;
1123 assert(
find(DeadFunctions, &Callee) == DeadFunctions.
end() &&
1124 "Cannot put cause a function to become dead twice!");
1146 for (
Function *InlinedCallee : InlinedCallees) {
1149 RC->insertTrivialRefEdge(N,
E.getNode());
1161 RC = &C->getOuterRefSCC();
1183 if ((C != OldC || UR.
CWorklist.count(OldC)) &&
1187 LLVM_DEBUG(
dbgs() <<
"Inlined an internal call edge and split an SCC, " 1188 "retaining this to avoid infinite inlining.\n");
1191 InlinedCallees.clear();
1201 for (
Function *DeadF : DeadFunctions) {
1208 FAM.
clear(*DeadF, DeadF->getName());
1209 AM.
clear(DeadC, DeadC.getName());
1210 auto &DeadRC = DeadC.getOuterRefSCC();
1219 M.getFunctionList().erase(DeadF);
InlinerFunctionImportStatsOpts
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
A parsed version of the target data layout string in and methods for querying it. ...
bool doFinalization(CallGraph &CG) override
Remove now-dead linkonce functions at the end of processing to avoid breaking the SCC traversal...
void setModuleInfo(const Module &M)
Set information like AllFunctions, ImportedFunctions, ModuleName.
bool hasLocalLinkage() const
DiagnosticInfoOptimizationBase::Argument NV
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
This class represents lattice values for constants.
static bool InlineHistoryIncludes(Function *F, int InlineHistoryID, const SmallVectorImpl< std::pair< Function *, int >> &InlineHistory)
Return true if the specified inline history ID indicates an inline history that includes the specifie...
A Module instance is used to store all the information related to an LLVM module. ...
LazyCallGraph::SCC & updateCGAndAnalysisManagerForFunctionPass(LazyCallGraph &G, LazyCallGraph::SCC &C, LazyCallGraph::Node &N, CGSCCAnalysisManager &AM, CGSCCUpdateResult &UR)
Helper to update the call graph after running a function pass.
void recordInline(const Function &Caller, const Function &Callee)
Record inline of.
void clear(IRUnitT &IR, llvm::StringRef Name)
Clear any cached analysis results for a single unit of IR.
static InlineResult InlineCallIfPossible(CallSite CS, InlineFunctionInfo &IFI, InlinedArrayAllocasTy &InlinedArrayAllocas, int InlineHistory, bool InsertLifetime, function_ref< AAResults &(Function &)> &AARGetter, ImportedFunctionsInliningStatistics &ImportedFunctionsStats)
If it is possible to inline the specified call site, do so and update the CallGraph for this operatio...
void push_back(const T &Elt)
virtual InlineCost getInlineCost(CallSite CS)=0
This method must be implemented by the subclass to determine the cost of inlining the specified call ...
SCC * lookupSCC(Node &N) const
Lookup a function's SCC in the graph.
Analysis providing profile information.
Implements a lazy call graph analysis and related passes for the new pass manager.
An immutable pass that tracks lazily created AssumptionCache objects.
An efficient, type-erasing, non-owning reference to a callable.
A cache of @llvm.assume calls within a function.
Analysis pass providing the TargetTransformInfo.
LLVMContext & getContext() const
All values hold a context through their type.
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
STATISTIC(NumFunctions, "Total number of functions")
InlineResult InlineFunction(CallInst *C, InlineFunctionInfo &IFI, AAResults *CalleeAAR=nullptr, bool InsertLifetime=true)
This function inlines the called function into the basic block of the caller.
Calculate and dump ThinLTO specific inliner stats.
static std::string inlineCostStr(const InlineCost &IC)
This class captures the data input to the InlineFunction call, and records the auxiliary results prod...
static void mergeInlinedArrayAllocas(Function *Caller, InlineFunctionInfo &IFI, InlinedArrayAllocasTy &InlinedArrayAllocas, int InlineHistory)
Look at all of the allocas that we inlined through this call site.
A proxy from a FunctionAnalysisManager to an SCC.
A node in the call graph for a module.
bool skipSCC(CallGraphSCC &SCC) const
Optional passes call this function to check whether the pass should be skipped.
void getAnalysisUsage(AnalysisUsage &Info) const override
getAnalysisUsage - For this class, we declare that we require and preserve the call graph...
Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager...
Represents the cost of inlining a function.
Module & getModule() const
Returns the module the call graph corresponds to.
AnalysisUsage & addRequired()
bool runOnSCC(CallGraphSCC &SCC) override
Main run interface method, this implements the interface required by the Pass class.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
unsigned getAlignment() const
Return the alignment of the memory that is being allocated by the instruction.
An analysis pass based on legacy pass manager to deliver ProfileSummaryInfo.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This class is a functor to be used in legacy module or SCC passes for computing AA results for a func...
bool isLibFunction(Function &F) const
Test whether a function is a known and defined library function tracked by the call graph...
This file contains the simple types necessary to represent the attributes associated with functions a...
Function * removeFunctionFromModule(CallGraphNode *CGN)
Unlink the function from this module, returning it.
InstrTy * getInstruction() const
PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR)
static Optional< InlineCost > shouldInline(CallSite CS, function_ref< InlineCost(CallSite CS)> GetInlineCost, OptimizationRemarkEmitter &ORE)
Return the cost only if the inliner should attempt to inline at the given CallSite.
auto reverse(ContainerTy &&C, typename std::enable_if< has_rbegin< ContainerTy >::value >::type *=nullptr) -> decltype(make_range(C.rbegin(), C.rend()))
This file provides interfaces used to build and manipulate a call graph, which is a very useful tool ...
bool insert(const value_type &X)
Insert a new element into the SetVector.
const T & getValue() const LLVM_LVALUE_FUNCTION
Class to represent array types.
A lazily constructed view of the call graph of a module.
const int LastCallToStaticBonus
DiagnosticInfoOptimizationBase::setIsVerbose setIsVerbose
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
InlineResult is basically true or false.
amdgpu Simplify well known AMD library false Value * Callee
void removeDeadConstantUsers() const
If there are any dead constant users dangling off of this constant, remove them.
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
bool hasLinkOnceODRLinkage() const
SmallVector< CallSite, 8 > InlinedCallSites
All of the new call sites inlined into the caller.
initializer< Ty > init(const Ty &Val)
void array_pod_sort(IteratorTy Start, IteratorTy End)
array_pod_sort - This sorts an array with the specified start and end extent.
void getAnalysisUsage(AnalysisUsage &Info) const override
For this class, we declare that we require and preserve the call graph.
void removeAnyCallEdgeTo(CallGraphNode *Callee)
Removes all call edges from this node to the specified callee function.
A set of analyses that are preserved following a run of a transformation pass.
LLVM Basic Block Representation.
bool inlineCalls(CallGraphSCC &SCC)
This function performs the main work of the pass.
An analysis pass based on the new PM to deliver ProfileSummaryInfo.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
ValuesClass values(OptsTy... Options)
Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
SmallPtrSetImpl< LazyCallGraph::RefSCC * > & InvalidatedRefSCCs
The set of invalidated RefSCCs which should be skipped if they are found in RCWorklist.
SmallPtrSetImpl< LazyCallGraph::SCC * > & InvalidatedSCCs
The set of invalidated SCCs which should be skipped if they are found in CWorklist.
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
Represent the analysis usage information of a pass.
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly...
A node in the call graph.
static void emit_inlined_into(OptimizationRemarkEmitter &ORE, DebugLoc &DLoc, const BasicBlock *Block, const Function &Callee, const Function &Caller, const InlineCost &IC)
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
A class used to represent edges in the call graph.
auto remove_if(R &&Range, UnaryPredicate P) -> decltype(adl_begin(Range))
Provide wrappers to std::remove_if which take ranges instead of having to pass begin/end explicitly...
Used in the streaming interface as the general argument type.
iterator erase(const_iterator CI)
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
bool doInitialization(CallGraph &CG) override
doInitialization - This method is called before the SCC's of the program has been processed...
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
int getThreshold() const
Get the threshold against which the cost was computed.
const char * getReason() const
Get the reason of Always or Never.
void getAAResultsAnalysisUsage(AnalysisUsage &AU)
A helper for the legacy pass manager to populate AU to add uses to make sure the analyses required by...
SmallPriorityWorklist< LazyCallGraph::SCC *, 1 > & CWorklist
Worklist of the SCCs queued for processing.
Type * getAllocatedType() const
Return the type that is being allocated by the instruction.
Function * getFunction() const
Returns the function that this call graph node represents.
A function analysis which provides an AssumptionCache.
static bool inlineCallsImpl(CallGraphSCC &SCC, CallGraph &CG, std::function< AssumptionCache &(Function &)> GetAssumptionCache, ProfileSummaryInfo *PSI, TargetLibraryInfo &TLI, bool InsertLifetime, function_ref< InlineCost(CallSite CS)> GetInlineCost, function_ref< AAResults &(Function &)> AARGetter, ImportedFunctionsInliningStatistics &ImportedFunctionsStats)
A SetVector that performs no allocations if smaller than a certain size.
Analysis pass which computes BlockFrequencyInfo.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
void removeDeadFunction(Function &F)
Remove a dead function from the call graph (typically to delete it).
ImportedFunctionsInliningStatistics ImportedFunctionsStats
An analysis over an "inner" IR unit that provides access to an analysis manager over a "outer" IR uni...
static cl::opt< bool > DisableInlinedAllocaMerging("disable-inlined-alloca-merging", cl::init(false), cl::Hidden)
Flag to disable manual alloca merging.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
Provides information about what library functions are available for the current target.
unsigned getABITypeAlignment(Type *Ty) const
Returns the minimum ABI-required alignment for the specified type.
void dropAllReferences()
dropAllReferences() - This method causes all the subinstructions to "let go" of all references that t...
AssumptionCacheTracker * ACT
bool removeDeadFunctions(CallGraph &CG, bool AlwaysInlineOnly=false)
Remove dead functions.
Node * lookup(const Function &F) const
Lookup a function in the graph which has already been scanned and added.
BBTy * getParent() const
Get the basic block containing the call site.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void mergeAttributesForInlining(Function &Caller, const Function &Callee)
Merge caller's and callee's attributes.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
void dump(bool Verbose)
Dump stats computed with InlinerStatistics class.
iterator_range< user_iterator > users()
int getCost() const
Get the inline cost estimate.
int getCostDelta() const
Get the cost delta from the threshold for inlining.
void addAttribute(unsigned i, Attribute::AttrKind Kind)
static void setInlineRemark(CallSite &CS, StringRef message)
#define clEnumValN(ENUMVAL, FLAGNAME, DESC)
amdgpu Simplify well known AMD library false Value Value * Arg
void filterDeadComdatFunctions(Module &M, SmallVectorImpl< Function *> &DeadComdatFunctions)
Filter out potentially dead comdat functions where other entries keep the entire comdat group alive...
SmallVector< AllocaInst *, 4 > StaticAllocas
InlineFunction fills this in with all static allocas that get copied into the caller.
The basic data container for the call graph of a Module of IR.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
FunTy * getCaller() const
Return the caller function for this call site.
LegacyInlinerBase(char &ID)
LLVM_NODISCARD bool empty() const
SmallVector< WeakTrackingVH, 8 > InlinedCalls
InlineFunction fills this in with callsites that were inlined from the callee.
StringRef getName() const
Return a constant reference to the value's name.
PassT::Result * getCachedResult(IRUnitT &IR) const
Get the cached result of an analysis pass for a given IR unit.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
void preserve()
Mark an analysis as preserved.
static Attribute get(LLVMContext &Context, AttrKind Kind, uint64_t Val=0)
Return a uniquified Attribute object.
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
CallGraphNode * getExternalCallingNode() const
Returns the CallGraphNode which is used to represent undetermined calls into the callgraph.
This header provides classes for managing passes over SCCs of the call graph.
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
FunTy * getCalledFunction() const
Return the function being called if this is a direct call, otherwise return null (if it's an indirect...
bool isArrayAllocation() const
Return true if there is an allocation size parameter to the allocation instruction that is not 1...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Module * getParent()
Get the module that this global value is contained inside of...
bool isInstructionTriviallyDead(Instruction *I, const TargetLibraryInfo *TLI=nullptr)
Return true if the result produced by the instruction is not used, and the instruction has no side ef...
LLVM Value Representation.
An SCC of the call graph.
CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on.
AssumptionCache & getAssumptionCache(Function &F)
Get the cached assumptions for a function.
print Print MemDeps of function
bool hasOneUse() const
Return true if there is exactly one user of this value.
StringRef - Represent a constant reference to a string, i.e.
This is the interface for LLVM's primary stateless and local alias analysis.
inst_range instructions(Function *F)
A container for analyses that lazily runs them and caches their results.
static bool shouldBeDeferred(Function *Caller, CallSite CS, InlineCost IC, int &TotalSecondaryCost, function_ref< InlineCost(CallSite CS)> GetInlineCost)
Return true if inlining of CS can block the caller from being inlined which is proved to be more bene...
static cl::opt< InlinerFunctionImportStatsOpts > InlinerFunctionImportStats("inliner-function-import-stats", cl::init(InlinerFunctionImportStatsOpts::No), cl::values(clEnumValN(InlinerFunctionImportStatsOpts::Basic, "basic", "basic statistics"), clEnumValN(InlinerFunctionImportStatsOpts::Verbose, "verbose", "printing of statistics for each inlined function")), cl::Hidden, cl::desc("Enable inliner stats for imported functions"))
This header defines various interfaces for pass management in LLVM.
SmallDenseSet< std::pair< LazyCallGraph::Node *, LazyCallGraph::SCC * >, 4 > & InlinedInternalEdges
A hacky area where the inliner can retain history about inlining decisions that mutated the call grap...
This represents the llvm.dbg.declare instruction.
Statically lint checks LLVM IR
bool isDefTriviallyDead() const
isDefTriviallyDead - Return true if it is trivially safe to remove this function definition from the ...
const BasicBlock * getParent() const
an instruction to allocate memory on the stack
static cl::opt< bool > InlineRemarkAttribute("inline-remark-attribute", cl::init(false), cl::Hidden, cl::desc("Enable adding inline-remark attribute to" " callsites processed by inliner but decided" " to be not inlined"))
Flag to add inline messages as callsite attributes 'inline-remark'.