LLVM 22.0.0git
llvm::RegAllocEvictionAdvisorProvider Class Referenceabstract

Common provider for legacy and new pass managers. More...

#include "llvm/CodeGen/RegAllocEvictionAdvisor.h"

Public Types

enum class  AdvisorMode : int { Default , Release , Development }

Public Member Functions

 RegAllocEvictionAdvisorProvider (AdvisorMode Mode, LLVMContext &Ctx)
virtual ~RegAllocEvictionAdvisorProvider ()=default
virtual void logRewardIfNeeded (const MachineFunction &MF, llvm::function_ref< float()> GetReward)
virtual std::unique_ptr< RegAllocEvictionAdvisorgetAdvisor (const MachineFunction &MF, const RAGreedy &RA, MachineBlockFrequencyInfo *MBFI, MachineLoopInfo *Loops)=0
AdvisorMode getAdvisorMode () const

Protected Attributes

LLVMContextCtx

Detailed Description

Common provider for legacy and new pass managers.

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.

Definition at line 158 of file RegAllocEvictionAdvisor.h.

Member Enumeration Documentation

◆ AdvisorMode

Enumerator
Default 
Release 
Development 

Definition at line 160 of file RegAllocEvictionAdvisor.h.

Constructor & Destructor Documentation

◆ RegAllocEvictionAdvisorProvider()

llvm::RegAllocEvictionAdvisorProvider::RegAllocEvictionAdvisorProvider ( AdvisorMode Mode,
LLVMContext & Ctx )
inline

Definition at line 161 of file RegAllocEvictionAdvisor.h.

References Ctx.

Referenced by INITIALIZE_PASS(), and INITIALIZE_PASS().

◆ ~RegAllocEvictionAdvisorProvider()

virtual llvm::RegAllocEvictionAdvisorProvider::~RegAllocEvictionAdvisorProvider ( )
virtualdefault

Member Function Documentation

◆ getAdvisor()

virtual std::unique_ptr< RegAllocEvictionAdvisor > llvm::RegAllocEvictionAdvisorProvider::getAdvisor ( const MachineFunction & MF,
const RAGreedy & RA,
MachineBlockFrequencyInfo * MBFI,
MachineLoopInfo * Loops )
pure virtual

References Loops, and RA.

Referenced by INITIALIZE_PASS(), and INITIALIZE_PASS().

◆ getAdvisorMode()

AdvisorMode llvm::RegAllocEvictionAdvisorProvider::getAdvisorMode ( ) const
inline

Definition at line 173 of file RegAllocEvictionAdvisor.h.

◆ logRewardIfNeeded()

virtual void llvm::RegAllocEvictionAdvisorProvider::logRewardIfNeeded ( const MachineFunction & MF,
llvm::function_ref< float()> GetReward )
inlinevirtual

Definition at line 166 of file RegAllocEvictionAdvisor.h.

Referenced by INITIALIZE_PASS().

Member Data Documentation

◆ Ctx

LLVMContext& llvm::RegAllocEvictionAdvisorProvider::Ctx
protected

Definition at line 176 of file RegAllocEvictionAdvisor.h.

Referenced by RegAllocEvictionAdvisorProvider().


The documentation for this class was generated from the following file: