[#llvm-MLInlineAdvice] = xref:llvm.adoc[llvm]::MLInlineAdvice :relfileprefix: ../ :mrdocs: InlineAdvice that tracks changes post inlining. For that reason, it only overrides the "successful inlining" extension points. == Synopsis Declared in `<llvm/Analysis/MLInlineAdvisor.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MLInlineAdvice : public xref:llvm/InlineAdvice.adoc[InlineAdvice] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:llvm/InlineAdvice.adoc[InlineAdvice]` | Captures state between an inlining decision and observing its impact. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/MLInlineAdvice/2constructor.adoc[`MLInlineAdvice`] [.small]#[constructor]# | Construct ML advice for call site `CB` with recommendation `Recommendation.` | xref:llvm/MLInlineAdvice/2destructor.adoc[`~MLInlineAdvice`] [.small]#[destructor]# [.small]#[virtual]# | Destroy ML advice after the inliner has recorded its decision. | xref:llvm/MLInlineAdvice/getCallee.adoc[`getCallee`] | Return the callee function captured before inlining. | xref:llvm/MLInlineAdvice/getCaller.adoc[`getCaller`] | Return the caller function captured before inlining. | xref:llvm/InlineAdvice/getOriginalCallSiteBasicBlock.adoc[`getOriginalCallSiteBasicBlock`] | Return the original call site basic block. | xref:llvm/InlineAdvice/getOriginalCallSiteDebugLoc.adoc[`getOriginalCallSiteDebugLoc`] | Return the original call site debug location. | xref:llvm/InlineAdvice/isInliningRecommended-0d.adoc[`isInliningRecommended`] | Get the inlining recommendation. | xref:llvm/InlineAdvice/recordInlining.adoc[`recordInlining`] | Exactly one of the record* APIs must be called. Implementers may extend behavior by implementing the corresponding record*Impl. | xref:llvm/MLInlineAdvice/recordInliningImpl.adoc[`recordInliningImpl`] [.small]#[virtual]# | Record a successful inlining that did not delete the callee. | xref:llvm/InlineAdvice/recordInliningWithCalleeDeleted.adoc[`recordInliningWithCalleeDeleted`] | Call after inlining succeeded, and results in the callee being delete‐able, meaning, it has no more users, and will be cleaned up subsequently. | xref:llvm/MLInlineAdvice/recordInliningWithCalleeDeletedImpl.adoc[`recordInliningWithCalleeDeletedImpl`] [.small]#[virtual]# | Record a successful inlining that left the callee delete‐able. | xref:llvm/InlineAdvice/recordUnattemptedInlining.adoc[`recordUnattemptedInlining`] | Call to indicate inlining was not attempted. | xref:llvm/MLInlineAdvice/recordUnattemptedInliningImpl.adoc[`recordUnattemptedInliningImpl`] [.small]#[virtual]# | Record that inlining was not attempted for this call site. | xref:llvm/InlineAdvice/recordUnsuccessfulInlining.adoc[`recordUnsuccessfulInlining`] | Call after the decision for a call site was to not inline. | xref:llvm/MLInlineAdvice/recordUnsuccessfulInliningImpl.adoc[`recordUnsuccessfulInliningImpl`] [.small]#[virtual]# | Record that inlining was attempted but unsuccessful. | xref:llvm/MLInlineAdvice/updateCachedCallerFPI.adoc[`updateCachedCallerFPI`] | Finish updating the cached caller FunctionPropertiesInfo after inlining. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/MLInlineAdvice/CalleeIRSize.adoc[`CalleeIRSize`] | IR size of the callee before this inlining attempt. | xref:llvm/MLInlineAdvice/CallerAndCalleeEdges.adoc[`CallerAndCalleeEdges`] | Sum of local call edges from caller and callee before inlining. | xref:llvm/MLInlineAdvice/CallerIRSize.adoc[`CallerIRSize`] | IR size of the caller before this inlining attempt. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/InlineAdvice/recordInliningImpl.adoc[`recordInliningImpl`] [.small]#[virtual]# | Hook invoked when successful inlining did not delete the callee. | xref:llvm/InlineAdvice/recordInliningWithCalleeDeletedImpl.adoc[`recordInliningWithCalleeDeletedImpl`] [.small]#[virtual]# | Hook invoked when successful inlining left the callee delete‐able. | xref:llvm/InlineAdvice/recordUnattemptedInliningImpl.adoc[`recordUnattemptedInliningImpl`] [.small]#[virtual]# | Hook invoked when inlining was not attempted. | xref:llvm/InlineAdvice/recordUnsuccessfulInliningImpl.adoc[`recordUnsuccessfulInliningImpl`] [.small]#[virtual]# | Hook invoked when inlining was decided against. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/InlineAdvice/Advisor.adoc[`Advisor`] | Owning advisor that produced this advice. | xref:llvm/InlineAdvice/Block.adoc[`Block`] | Basic block containing the original call site. | xref:llvm/InlineAdvice/Callee.adoc[`Callee`] | Callee function before inlining. | xref:llvm/InlineAdvice/Caller.adoc[`Caller`] | Caller function before inlining. | xref:llvm/InlineAdvice/DLoc.adoc[`DLoc`] | Debug location of the original call site. | xref:llvm/InlineAdvice/IsInliningRecommended-05.adoc[`IsInliningRecommended`] | Whether this advice recommends inlining. | xref:llvm/InlineAdvice/ORE.adoc[`ORE`] | Remark emitter for reporting inlining outcomes. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#