class AssumptionCacheTracker

Declaration

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

Description

An immutable pass that tracks lazily created \c AssumptionCache objects. This is essentially a workaround for the legacy pass manager's weaknesses which associates each assumption cache with Function and clears it if the function is deleted. The nature of the AssumptionCache is that it is not invalidated by any changes to the function body and so this is sufficient to be conservatively correct.

Declared at: llvm/include/llvm/Analysis/AssumptionCache.h:202

Inherits from: ImmutablePass

Member Variables

private llvm::AssumptionCacheTracker::FunctionCallsMap AssumptionCaches
public static char ID

Method Overview

Inherited from ImmutablePass:

Inherited from ModulePass:

Inherited from Pass:

Methods

AssumptionCacheTracker()

Declared at: llvm/include/llvm/Analysis/AssumptionCache.h:236

bool doFinalization(llvm::Module&)

Description

doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run.

Declared at: llvm/include/llvm/Analysis/AssumptionCache.h:246

Parameters

llvm::Module&

llvm::AssumptionCache& getAssumptionCache(
    llvm::Function& F)

Description

Get the cached assumptions for a function. If no assumptions are cached, this will scan the function. Otherwise, the existing cache will be returned.

Declared at: llvm/include/llvm/Analysis/AssumptionCache.h:230

Parameters

llvm::Function& F

llvm::AssumptionCache* lookupAssumptionCache(
    llvm::Function& F)

Description

Return the cached assumptions for a function if it has already been scanned. Otherwise return nullptr.

Declared at: llvm/include/llvm/Analysis/AssumptionCache.h:234

Parameters

llvm::Function& F

void releaseMemory()

Description

releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused. Optionally implement this function to release pass memory when it is no longer used.

Declared at: llvm/include/llvm/Analysis/AssumptionCache.h:239

void verifyAnalysis() const

Description

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

Declared at: llvm/include/llvm/Analysis/AssumptionCache.h:244

~AssumptionCacheTracker()

Declared at: llvm/include/llvm/Analysis/AssumptionCache.h:237