llvm::InnerAnalysisManagerProxy

Proxies an inner analysis manager through an analysis of an outer IR unit.

Synopsis

Declared in <llvm/IR/PassManager.h>

template<
    typename AnalysisManagerT,
    typename IRUnitT,
    typename... ExtraArgTs>
class InnerAnalysisManagerProxy
    : public AnalysisInfoMixin<InnerAnalysisManagerProxy<AnalysisManagerT, IRUnitT>>

Description

The inner IR unit must be contained in the outer unit.

For example, InnerAnalysisManagerProxy<FunctionAnalysisManager, Module> is an analysis over Modules (the "outer" unit) that provides access to a Function analysis manager. The FunctionAnalysisManager is the "inner" manager being proxied, and Functions are the "inner" unit. The inner/outer relationship is valid because each Function is contained in one Module.

If you're (transitively) within a pass manager for an IR unit U that contains IR unit V, you should never use an analysis manager over V, except via one of these proxies.

Note that the proxy's result is a move-only RAII object. The validity of the analyses in the inner analysis manager is tied to its lifetime.

Base Classes

NameDescription
AnalysisInfoMixin<InnerAnalysisManagerProxy<AnalysisManagerT, IRUnitT>>A CRTP mix-in that provides informational APIs needed for analysis passes.

Types

NameDescription
Result Proxy result owning invalidation responsibility for an inner analysis manager.

Member Functions

NameDescription
InnerAnalysisManagerProxy [constructor]Construct a proxy over the given inner analysis manager.
run Run the analysis pass and create our proxy result object.

Static Member Functions

NameDescription
ID Returns an opaque, unique ID for this analysis type.
name Gets the name of the pass we are mixed into.

Specializations

Name
InnerAnalysisManagerProxy<CGSCCAnalysisManager, Module>
InnerAnalysisManagerProxy<LoopAnalysisManager, Function>

Friends

NameDescription
llvm::AnalysisInfoMixinA CRTP mix-in that provides informational APIs needed for analysis passes.

Template Parameters

NameDescription
AnalysisManagerTInner analysis manager type being proxied.
IRUnitTOuter IR unit type this proxy is an analysis of.
ExtraArgTsExtra argument types for the outer analysis manager.