class PreservedAnalyses

Declaration

class PreservedAnalyses { /* full declaration omitted */ };

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

Method Overview

  • public void abandon(llvm::AnalysisKey * ID)
  • public template <typename AnalysisT>void abandon()
  • public static llvm::PreservedAnalyses all()
  • public bool allAnalysesInSetPreserved(llvm::AnalysisSetKey * SetID) const
  • public template <typename AnalysisSetT>bool allAnalysesInSetPreserved() const
  • public template <typename AnalysisSetT>static llvm::PreservedAnalyses allInSet()
  • public bool areAllPreserved() const
  • public llvm::PreservedAnalyses::PreservedAnalysisChecker getChecker(llvm::AnalysisKey * ID) const
  • public template <typename AnalysisT>llvm::PreservedAnalyses::PreservedAnalysisChecker getChecker() const
  • public void intersect(const llvm::PreservedAnalyses & Arg)
  • public void intersect(llvm::PreservedAnalyses && Arg)
  • public static llvm::PreservedAnalyses none()
  • public void preserve(llvm::AnalysisKey * ID)
  • public template <typename AnalysisT>void preserve()
  • public void preserveSet(llvm::AnalysisSetKey * ID)
  • public template <typename AnalysisSetT>void preserveSet()

Methods

void abandon(llvm::AnalysisKey* ID)

Description

Mark an analysis as abandoned using its ID. An abandoned analysis is not preserved, even if it is nominally covered by some other set or was previously explicitly marked as preserved. Note that you can only abandon a specific analysis, not a *set* of analyses.

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

Parameters

llvm::AnalysisKey* ID

template <typename AnalysisT>
void abandon()

Description

Mark an analysis as abandoned. An abandoned analysis is not preserved, even if it is nominally covered by some other set or was previously explicitly marked as preserved. Note that you can only abandon a specific analysis, not a *set* of analyses.

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

Templates

AnalysisT

static llvm::PreservedAnalyses all()

Description

Construct a special preserved set that preserves all passes.

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

bool allAnalysesInSetPreserved(
    llvm::AnalysisSetKey* SetID) const

Description

Directly test whether a set of analyses is preserved. This is only true when no analyses have been explicitly abandoned.

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

Parameters

llvm::AnalysisSetKey* SetID

template <typename AnalysisSetT>
bool allAnalysesInSetPreserved() const

Description

Directly test whether a set of analyses is preserved. This is only true when no analyses have been explicitly abandoned.

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

Templates

AnalysisSetT

template <typename AnalysisSetT>
static llvm::PreservedAnalyses allInSet()

Description

Construct a preserved analyses object with a single preserved set.

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

Templates

AnalysisSetT

bool areAllPreserved() const

Description

Test whether all analyses are preserved (and none are abandoned). This is used primarily to optimize for the common case of a transformation which makes no changes to the IR.

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

llvm::PreservedAnalyses::PreservedAnalysisChecker
getChecker(llvm::AnalysisKey* ID) const

Description

Build a checker for this `PreservedAnalyses` and the specified analysis ID. You can use the returned object to query whether an analysis was preserved. See the example in the comment on `PreservedAnalysis`.

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

Parameters

llvm::AnalysisKey* ID

template <typename AnalysisT>
llvm::PreservedAnalyses::PreservedAnalysisChecker
getChecker() const

Description

Build a checker for this `PreservedAnalyses` and the specified analysis type. You can use the returned object to query whether an analysis was preserved. See the example in the comment on `PreservedAnalysis`.

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

Templates

AnalysisT

void intersect(const llvm::PreservedAnalyses& Arg)

Description

Intersect this set with another in place. This is a mutating operation on this preserved set, removing all preserved passes which are not also preserved in the argument.

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

Parameters

const llvm::PreservedAnalyses& Arg

void intersect(llvm::PreservedAnalyses&& Arg)

Description

Intersect this set with a temporary other set in place. This is a mutating operation on this preserved set, removing all preserved passes which are not also preserved in the argument.

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

Parameters

llvm::PreservedAnalyses&& Arg

static llvm::PreservedAnalyses none()

Description

Convenience factory function for the empty preserved set.

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

void preserve(llvm::AnalysisKey* ID)

Description

Given an analysis's ID, mark the analysis as preserved, adding it to the set.

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

Parameters

llvm::AnalysisKey* ID

template <typename AnalysisT>
void preserve()

Description

Mark an analysis as preserved.

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

Templates

AnalysisT

void preserveSet(llvm::AnalysisSetKey* ID)

Description

Mark an analysis set as preserved using its ID.

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

Parameters

llvm::AnalysisSetKey* ID

template <typename AnalysisSetT>
void preserveSet()

Description

Mark an analysis set as preserved.

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

Templates

AnalysisSetT