[#llvm-InlineAdvice] = xref:llvm.adoc[llvm]::InlineAdvice :relfileprefix: ../ :mrdocs: Captures state between an inlining decision and observing its impact. == Synopsis Declared in `<llvm/Analysis/InlineAdvisor.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class InlineAdvice; ---- == Description Capture state between an inlining decision having had been made, and its impact being observable. When collecting model training data, this allows recording features/decisions/partial reward data sets. Derivations of this type are expected to be tightly coupled with their InliningAdvisors. The base type implements the minimal contractual obligations. == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/InlineAdvice/2constructor-0a.adoc[`InlineAdvice`] [.small]#[constructor]# | Constructors | xref:llvm/InlineAdvice/2destructor.adoc[`~InlineAdvice`] [.small]#[destructor]# [.small]#[virtual]# | Destroy advice after the inliner has recorded its decision. | 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/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/InlineAdvice/recordUnattemptedInlining.adoc[`recordUnattemptedInlining`] | Call to indicate inlining was not attempted. | xref:llvm/InlineAdvice/recordUnsuccessfulInlining.adoc[`recordUnsuccessfulInlining`] | Call after the decision for a call site was to not inline. |=== == 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. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:llvm/DefaultInlineAdvice.adoc[`DefaultInlineAdvice`] | Default InlineAdvice that records outcomes using an optional InlineCost. | xref:llvm/MLInlineAdvice.adoc[`MLInlineAdvice`] | InlineAdvice that tracks changes post inlining. For that reason, it only overrides the "successful inlining" extension points. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#