llvm::InlineFunction

InlineFunction overloads

Synopses

Declared in <llvm/Transforms/Utils/Cloning.h>

Inline the callee of CB into its caller's basic block.

InlineResult
InlineFunction(
    CallBase& CB,
    InlineFunctionInfo& IFI,
    bool MergeAttributes = false,
    AAResults* CalleeAAR = nullptr,
    bool InsertLifetime = true,
    bool TrackInlineHistory = false,
    Function* ForwardVarArgsTo = nullptr,
    OptimizationRemarkEmitter* ORE = nullptr);
» more...

Inline CB while also updating a contextual profile.

InlineResult
InlineFunction(
    CallBase& CB,
    InlineFunctionInfo& IFI,
    PGOContextualProfile& CtxProf,
    bool MergeAttributes = false,
    AAResults* CalleeAAR = nullptr,
    bool InsertLifetime = true,
    bool TrackInlineHistory = false,
    Function* ForwardVarArgsTo = nullptr,
    OptimizationRemarkEmitter* ORE = nullptr);
» more...

Return Value

Success if the call was inlined, otherwise a failure reason.

Parameters

NameDescription
CBCall site whose callee should be inlined.
IFIInlining context and result collector.
MergeAttributesWhether to merge callee attributes into the caller.
CalleeAAROptional alias-analysis results for the callee.
InsertLifetimeWhether to insert lifetime markers for inlined allocas.
TrackInlineHistoryWhether to record inline history metadata.
ForwardVarArgsToIf set, forward varargs from the callsite to calls to this function.
OREOptional optimization-remark emitter for diagnostics.
CtxProfContextual profile to update for the inlined callsite.