Immutable analysis that provides the eviction advisor.

Synopsis

Declared in <llvm/CodeGen/RegAllocEvictionAdvisor.h>

class RegAllocEvictionAdvisorAnalysisLegacy
    : public ImmutablePass

Description

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.

Base Classes

Name

Description

ImmutablePass

ImmutablePass class ‐ This class is used to provide information that does not need to be run. This is useful for things like target information.

Enums

Name

Description

AdvisorMode

Which eviction advisor implementation this analysis provides.

Member Functions

Name

Description

RegAllocEvictionAdvisorAnalysisLegacy [constructor]

Construct the analysis for advisor mode Mode.

operator= [deleted]

Passes are not assignable.

assignPassManager

assignPassManager overloads

createPrinterPass [virtual]

createPrinterPass ‐ Get a module printer pass.

doFinalization [virtual]

Perform any cleanup needed after all passes have run.

doInitialization [virtual]

Perform any initialization needed before any pass is run.

dump

Print this pass's state to stderr for debugging.

dumpPassStructure [virtual]

Print the pass nesting structure for ‐debug‐passes=PassStructure.

getAdvisorMode

Return the advisor mode this analysis was constructed with.

getAnalysis

getAnalysis overloads

getAnalysisID

getAnalysisID overloads

getAnalysisIfAvailable

Get an optional analysis result that may already be available.

getAnalysisUsage [virtual]

Declare which analyses this pass requires and preserves.

getAsImmutablePass [virtual]

Return this pass as an ImmutablePass.

getAsPMDataManager [virtual]

Return this pass as a PMDataManager when it is a nested pass manager.

getPassArgument

Return a nice clean name for a pass corresponding to that used to enable the pass in opt.

getPassID

getPassID ‐ Return the PassID number that corresponds to this pass.

getPassKind

Return the kind of pass (module, function, loop, etc.).

getPassName [virtual]

Return a human‐readable name for this pass.

getPotentialPassManagerType [virtual]

Return what kind of Pass Manager can manage this pass.

getProvider

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

getResolver

Return the analysis resolver installed for this pass.

initializePass [virtual]

Perform initialization for this immutable pass.

logRewardIfNeeded [virtual]

Log a reward for MF when the advisor mode requires it.

mustPreserveAnalysisID

Report whether the analysis identified by AID must be preserved.

preparePassManager [virtual]

Check whether available pass managers are suitable for this pass.

print [virtual]

Print the internal state of this pass for analysis dumping.

releaseMemory [virtual]

Release memory held by this pass when it is no longer needed.

runOnModule [virtual]

ImmutablePasses are never run.

setResolver

Install the analysis resolver used to satisfy this pass's dependencies.

verifyAnalysis [virtual]

verifyAnalysis() ‐ This member can be implemented by a analysis pass to check state of analysis information.

Static Member Functions

Name

Description

createPass

Construct a new instance of the pass identified by ID.

lookupPassInfo

lookupPassInfo overloads

Static Data Members

Name

Description

ID

Pass identification, replacement for typeid.

Protected Member Functions

Name

Description

getAnalysisUsage [virtual]

Preserve all analyses; subclasses may declare extra requirements.

skipModule

Optional passes call this function to check whether the pass should be skipped. This is the case when optimization bisect is over the limit.

Protected Data Members

Name

Description

Provider

Owned provider that constructs per‐function advisors.

Non-Member Functions

Name

Description

createDevelopmentModeAdvisorAnalysisLegacy

Create the legacy analysis for the development‐mode ML eviction advisor.

createReleaseModeAdvisorAnalysisLegacy

Create the legacy analysis for the release‐mode ML eviction advisor.

getBestSimplifyQuery

Build a SimplifyQuery from analyses currently valid in a pass.

getPassTimer

Request the timer for this legacy‐pass‐manager's pass instance.

isBitcodeWriterPass

Check whether a pass is a BitcodeWriterPass.

isIRPrintingPass

Return true if a pass is for IR printing.

Created with MrDocs