[#llvm-RegAllocEvictionAdvisorProvider] = xref:llvm.adoc[llvm]::RegAllocEvictionAdvisorProvider :relfileprefix: ../ :mrdocs: Common provider for legacy and new pass managers. == Synopsis Declared in `<llvm/CodeGen/RegAllocEvictionAdvisor.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class RegAllocEvictionAdvisorProvider; ---- == Description This keeps the state for logging, and sets up and holds the provider. The legacy pass itself used to keep the logging state and provider, so this extraction helps the NPM analysis to reuse the logic. TODO: Coalesce this with the NPM analysis when legacy PM is removed. == Enums [cols="1,4"] |=== | Name| Description | xref:llvm/RegAllocEvictionAdvisorProvider/AdvisorMode.adoc[`AdvisorMode`] | Which eviction advisor implementation to construct. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/RegAllocEvictionAdvisorProvider/2constructor.adoc[`RegAllocEvictionAdvisorProvider`] [.small]#[constructor]# | Construct a provider for advisor mode `Mode` using context `Ctx.` | xref:llvm/RegAllocEvictionAdvisorProvider/2destructor.adoc[`~RegAllocEvictionAdvisorProvider`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this provider. | xref:llvm/RegAllocEvictionAdvisorProvider/getAdvisor.adoc[`getAdvisor`] [.small]#[virtual]# | Create an eviction advisor for `MF` and allocator `RA.` | xref:llvm/RegAllocEvictionAdvisorProvider/getAdvisorMode.adoc[`getAdvisorMode`] | Return the advisor mode this provider was constructed with. | xref:llvm/RegAllocEvictionAdvisorProvider/logRewardIfNeeded.adoc[`logRewardIfNeeded`] [.small]#[virtual]# | Log a reward for `MF` when the advisor mode requires it. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/RegAllocEvictionAdvisorProvider/Ctx.adoc[`Ctx`] | LLVM context used when constructing advisors and loggers. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/createDevelopmentModeAdvisorProvider.adoc[`createDevelopmentModeAdvisorProvider`] | Create a development‐mode ML eviction advisor provider. | xref:llvm/createReleaseModeAdvisorProvider.adoc[`createReleaseModeAdvisorProvider`] | Create a release‐mode ML eviction advisor provider. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#