LLVM  mainline
Classes | Namespaces | Typedefs | Functions
PassManager.h File Reference
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManagerInternal.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/type_traits.h"
#include <list>
#include <memory>
#include <vector>
Include dependency graph for PassManager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  llvm::PreservedAnalyses
 An abstract set of preserved analyses following a transformation pass run. More...
class  llvm::PassManager< IRUnitT >
 Manages a sequence of passes over units of IR. More...
class  llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >
 A CRTP base used to implement analysis managers. More...
class  llvm::AnalysisManager< IRUnitT >
 A generic analysis pass manager with lazy running and caching of results. More...
class  llvm::FunctionAnalysisManagerModuleProxy
 A module analysis which acts as a proxy for a function analysis manager. More...
class  llvm::FunctionAnalysisManagerModuleProxy::Result
 The result proxy object for the FunctionAnalysisManagerModuleProxy. More...
class  llvm::ModuleAnalysisManagerFunctionProxy
 A function analysis which acts as a proxy for a module analysis manager. More...
class  llvm::ModuleAnalysisManagerFunctionProxy::Result
 Result proxy object for ModuleAnalysisManagerFunctionProxy. More...
class  llvm::ModuleToFunctionPassAdaptor< FunctionPassT >
 Trivial adaptor that maps from a module to its functions. More...
struct  llvm::RequireAnalysisPass< AnalysisT >
 A template utility pass to force an analysis result to be available. More...
struct  llvm::InvalidateAnalysisPass< AnalysisT >
 A template utility pass to force an analysis result to be invalidated. More...
struct  llvm::InvalidateAllAnalysesPass
 A utility pass that does nothing but preserves no analyses. More...


namespace  llvm

Compute iterated dominance frontiers using a linear time algorithm.

namespace  llvm::detail

Implementation details of the pass manager interfaces.


typedef PassManager< Module > llvm::ModulePassManager
 Convenience typedef for a pass manager over modules.
typedef PassManager< Function > llvm::FunctionPassManager
 Convenience typedef for a pass manager over functions.
typedef AnalysisManager< Module > llvm::ModuleAnalysisManager
 Convenience typedef for the Module analysis manager.
typedef AnalysisManager< Function > llvm::FunctionAnalysisManager
 Convenience typedef for the Function analysis manager.


template<typename FunctionPassT >
< FunctionPassT > 
llvm::createModuleToFunctionPassAdaptor (FunctionPassT Pass)
 A function to deduce a function pass type and wrap it in the templated adaptor.

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.

FunctionPassManager can run over a Module, runs each pass over a Function. ModulePassManager must be directly run, runs each pass over the Module.

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: http://github.com/sean-parent/sean-parent.github.com/wiki/Papers-and-Presentations http://www.youtube.com/watch?v=_BpMYeUFXv8 http://channel9.msdn.com/Events/GoingNative/2013/Inheritance-Is-The-Base-Class-of-Evil

Definition in file PassManager.h.