class AnalysisManager::Invalidator

Declaration

class AnalysisManager::Invalidator { /* full declaration omitted */ };

Declared at: llvm/include/llvm/IR/PassManager.h:649

Method Overview

  • public Invalidator(int & IsResultInvalidated, const int & Results)
  • public bool invalidate(llvm::AnalysisKey * ID, IRUnitT & IR, const llvm::PreservedAnalyses & PA)
  • public template <typename PassT>bool invalidate(IRUnitT & IR, const llvm::PreservedAnalyses & PA)

Methods

Invalidator(int& IsResultInvalidated,
            const int& Results)

Declared at: llvm/include/llvm/IR/PassManager.h:719

Parameters

int& IsResultInvalidated
const int& Results

bool invalidate(llvm::AnalysisKey* ID,
                IRUnitT& IR,
                const llvm::PreservedAnalyses& PA)

Description

A type-erased variant of the above invalidate method with the same core API other than passing an analysis ID rather than an analysis type parameter. This is sadly less efficient than the above routine, which leverages the type parameter to avoid the type erasure overhead.

Declared at: llvm/include/llvm/IR/PassManager.h:681

Parameters

llvm::AnalysisKey* ID
IRUnitT& IR
const llvm::PreservedAnalyses& PA

template <typename PassT>
bool invalidate(IRUnitT& IR,
                const llvm::PreservedAnalyses& PA)

Description

Trigger the invalidation of some other analysis pass if not already handled and return whether it was in fact invalidated. This is expected to be called from within a given analysis result's \c invalidate method to trigger a depth-first walk of all inter-analysis dependencies. The same \p IR unit and \p PA passed to that result's \c invalidate method should in turn be provided to this routine. The first time this is called for a given analysis pass, it will call the corresponding result's \c invalidate method. Subsequent calls will use a cache of the results of that initial call. It is an error to form cyclic dependencies between analysis results. This returns true if the given analysis's result is invalid. Any dependecies on it will become invalid as a result.

Declared at: llvm/include/llvm/IR/PassManager.h:667

Templates

PassT

Parameters

IRUnitT& IR
const llvm::PreservedAnalyses& PA