class RegAllocEvictionAdvisorAnalysis

Declaration

class RegAllocEvictionAdvisorAnalysis : public ImmutablePass { /* full declaration omitted */ };

Description

ImmutableAnalysis abstraction for fetching the Eviction Advisor. We model it as an analysis to decouple the user from the implementation insofar as dependencies on other analyses goes. The motivation for it being an immutable pass is twofold: - in the ML implementation case, the evaluator is stateless but (especially in the development mode) expensive to set up. With an immutable pass, we set it up once. - in the 'development' mode ML case, we want to capture the training log during allocation (this is a log of features encountered and decisions made), and then measure a score, potentially a few steps after allocation completes. So we need the properties of an immutable pass to keep the logger state around until we can make that measurement. Because we need to offer additional services in 'development' mode, the implementations of this analysis need to implement RTTI support.

Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:168

Inherits from: ImmutablePass

Member Variables

private const llvm::RegAllocEvictionAdvisorAnalysis:: AdvisorMode Mode
public static char ID

Method Overview

Inherited from ImmutablePass:

Inherited from ModulePass:

Inherited from Pass:

Methods

RegAllocEvictionAdvisorAnalysis(
    llvm::RegAllocEvictionAdvisorAnalysis::
        AdvisorMode Mode)

Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:172

Parameters

llvm::RegAllocEvictionAdvisorAnalysis::AdvisorMode Mode

virtual std::unique_ptr<RegAllocEvictionAdvisor>
getAdvisor(const llvm::MachineFunction& MF,
           const llvm::RAGreedy& RA)

Description

Get an advisor for the given context (i.e. machine function, etc)

Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:178

Parameters

const llvm::MachineFunction& MF
const llvm::RAGreedy& RA

llvm::RegAllocEvictionAdvisorAnalysis::AdvisorMode
getAdvisorMode() const

Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:179

void getAnalysisUsage(
    llvm::AnalysisUsage& AU) const

Description

getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis <AnalysisType >() function, below.

Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:184

Parameters

llvm::AnalysisUsage& AU

llvm::StringRef getPassName() const

Description

getPassName - Return a nice clean name for a pass. This usually implemented in terms of the name that is registered by one of the Registration templates, but can be overloaded directly.

Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:189