Inline CB while also updating a contextual profile.
Declared in <llvm/Transforms/Utils/Cloning.h>
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);
Same as above, but it will update the contextual profile. If the contextual profile is invalid (i.e. not loaded because it is not present), it defaults to the behavior of the non-contextual profile updating variant above. This makes it easy to drop-in replace uses of the non-contextual overload.
Success if the call was inlined, otherwise a failure reason.
| Name | Description |
|---|---|
| CB | Call site whose callee should be inlined. |
| IFI | Inlining context and result collector. |
| CtxProf | Contextual profile to update for the inlined callsite. |
| MergeAttributes | Whether to merge callee attributes into the caller. |
| CalleeAAR | Optional alias-analysis results for the callee. |
| InsertLifetime | Whether to insert lifetime markers for inlined allocas. |
| TrackInlineHistory | Whether to record inline history metadata. |
| ForwardVarArgsTo | If set, forward varargs from the callsite to calls to this function. |
| ORE | Optional optimization-remark emitter for diagnostics. |