LLVM  6.0.0svn
Classes | Namespaces | Typedefs | Functions
PassManager.h File Reference

This header defines various interfaces for pass management in LLVM. More...

#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManagerInternal.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/TypeName.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstring>
#include <iterator>
#include <list>
#include <memory>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for PassManager.h:

Go to the source code of this file.

Classes

struct  llvm::AnalysisKey
 A special type used by analysis passes to provide an address that identifies that particular analysis pass type. More...
 
struct  llvm::AnalysisSetKey
 A special type used to provide an address that identifies a set of related analyses. More...
 
class  llvm::AllAnalysesOn< IRUnitT >
 This templated class represents "all analyses that operate over \<a particular IR unit\>" (e.g. More...
 
class  llvm::CFGAnalyses
 Represents analyses that only rely on functions' control flow. More...
 
class  llvm::PreservedAnalyses
 A set of analyses that are preserved following a run of a transformation pass. More...
 
class  llvm::PreservedAnalyses::PreservedAnalysisChecker
 A checker object that makes it easy to query for whether an analysis or some set covering it is preserved. More...
 
class  llvm::AnalysisManager< IRUnitT, ExtraArgTs >
 A container for analyses that lazily runs them and caches their results. More...
 
struct  llvm::PassInfoMixin< DerivedT >
 A CRTP mix-in to automatically provide informational APIs needed for passes. More...
 
struct  llvm::AnalysisInfoMixin< DerivedT >
 A CRTP mix-in that provides informational APIs needed for analysis passes. More...
 
class  llvm::PassManager< IRUnitT, AnalysisManagerT, ExtraArgTs >
 Manages a sequence of passes over a particular unit of IR. More...
 
class  llvm::AnalysisManager< IRUnitT, ExtraArgTs >
 A container for analyses that lazily runs them and caches their results. More...
 
class  llvm::AnalysisManager< IRUnitT, ExtraArgTs >::Invalidator
 API to communicate dependencies between analyses during invalidation. More...
 
class  llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs >
 An analysis over an "outer" IR unit that provides access to an analysis manager over an "inner" IR unit. More...
 
class  llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs >::Result
 
class  llvm::OuterAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs >
 An analysis over an "inner" IR unit that provides access to an analysis manager over a "outer" IR unit. More...
 
class  llvm::OuterAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs >::Result
 Result proxy object for OuterAnalysisManagerProxy. More...
 
class  llvm::ModuleToFunctionPassAdaptor< FunctionPassT >
 Trivial adaptor that maps from a module to its functions. More...
 
struct  llvm::RequireAnalysisPass< AnalysisT, IRUnitT, AnalysisManagerT, ExtraArgTs >
 A utility pass template to force an analysis result to be available. More...
 
struct  llvm::InvalidateAnalysisPass< AnalysisT >
 A no-op pass template which simply forces a specific analysis result to be invalidated. More...
 
struct  llvm::InvalidateAllAnalysesPass
 A utility pass that does nothing, but preserves no analyses. More...
 
class  llvm::RepeatedPass< PassT >
 A utility pass template that simply runs another pass multiple times. More...
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Typedefs

using llvm::ModulePassManager = PassManager< Module >
 Convenience typedef for a pass manager over modules. More...
 
using llvm::FunctionPassManager = PassManager< Function >
 Convenience typedef for a pass manager over functions. More...
 
using llvm::ModuleAnalysisManager = AnalysisManager< Module >
 Convenience typedef for the Module analysis manager. More...
 
using llvm::FunctionAnalysisManager = AnalysisManager< Function >
 Convenience typedef for the Function analysis manager. More...
 
using llvm::FunctionAnalysisManagerModuleProxy = InnerAnalysisManagerProxy< FunctionAnalysisManager, Module >
 Provide the FunctionAnalysisManager to Module proxy. More...
 
using llvm::ModuleAnalysisManagerFunctionProxy = OuterAnalysisManagerProxy< ModuleAnalysisManager, Function >
 Provide the ModuleAnalysisManager to Function proxy. More...
 

Functions

template<typename FunctionPassT >
ModuleToFunctionPassAdaptor< FunctionPassT > llvm::createModuleToFunctionPassAdaptor (FunctionPassT Pass)
 A function to deduce a function pass type and wrap it in the templated adaptor. More...
 
template<typename PassT >
RepeatedPass< PassT > llvm::createRepeatedPass (int Count, PassT P)
 

Detailed Description

This header defines various interfaces for pass management in LLVM.

There is no "pass" interface in LLVM per se. Instead, an instance of any class which supports a method to 'run' it over a unit of IR can be used as a pass. A pass manager is generally a tool to collect a sequence of passes which run over a particular IR construct, and run each of them in sequence over each such construct in the containing IR construct. As there is no containing IR construct for a Module, a manager for passes over modules forms the base case which runs its managed passes in sequence over the single module provided.

The core IR library provides managers for running passes over modules and functions.

Note that the implementations of the pass managers use concept-based polymorphism as outlined in the "Value Semantics and Concept-based Polymorphism" talk (or its abbreviated sibling "Inheritance Is The Base Class of Evil") by Sean Parent:

Definition in file PassManager.h.