struct AnalysisInfoMixin

Declaration

template <typename DerivedT>
struct AnalysisInfoMixin { /* full declaration omitted */ };

Description

A CRTP mix-in that provides informational APIs needed for analysis passes. This provides some boilerplate for types that are analysis passes. It automatically mixes in \c PassInfoMixin.

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

Templates

DerivedT

Method Overview

  • public static llvm::AnalysisKey * ID()

Methods

ΒΆstatic llvm::AnalysisKey* ID()

Description

Returns an opaque, unique ID for this analysis type. This ID is a pointer type that is guaranteed to be 8-byte aligned and thus suitable for use in sets, maps, and other data structures that use the low bits of pointers. Note that this requires the derived type provide a static \c AnalysisKey member called \c Key. FIXME: The only reason the mixin type itself can't declare the Key value is that some compilers cannot correctly unique a templated static variable so it has the same addresses in each instantiation. The only currently known platform with this limitation is Windows DLL builds, specifically building each part of LLVM as a DLL. If we ever remove that build configuration, this mixin can provide the static key as well.

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