LLVM API Documentation

Classes | Namespaces | Functions
IR/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/Support/type_traits.h"
#include <list>
#include <memory>
#include <vector>
Include dependency graph for IR/PassManager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::PreservedAnalyses
 An abstract set of preserved analyses following a transformation pass run. More...
struct  llvm::detail::PassConcept< IRUnitT, AnalysisManagerT >
 Template for the abstract base class used to dispatch polymorphically over pass objects. More...
class  llvm::detail::PassRunAcceptsAnalysisManager< IRUnitT, AnalysisManagerT, PassT, ResultT >
 SFINAE metafunction for computing whether PassT has a run method accepting an AnalysisManagerT. More...
struct  llvm::detail::PassRunAcceptsAnalysisManager< IRUnitT, AnalysisManagerT, PassT, ResultT >::BigType
struct  llvm::detail::PassModel< IRUnitT, AnalysisManagerT, PassT, true >
 Specialization of PassModel for passes that accept an analyis manager. More...
struct  llvm::detail::PassModel< IRUnitT, AnalysisManagerT, PassT, false >
 Specialization of PassModel for passes that accept an analyis manager. More...
struct  llvm::detail::AnalysisResultConcept< IRUnitT >
 Abstract concept of an analysis result. More...
class  llvm::detail::ResultHasInvalidateMethod< IRUnitT, ResultT >
 SFINAE metafunction for computing whether ResultT provides an invalidate member function. More...
struct  llvm::detail::ResultHasInvalidateMethod< IRUnitT, ResultT >::BigType
struct  llvm::detail::AnalysisResultModel< IRUnitT, PassT, ResultT, false >
 Specialization of AnalysisResultModel which provides the default invalidate functionality. More...
struct  llvm::detail::AnalysisResultModel< IRUnitT, PassT, ResultT, true >
 Specialization of AnalysisResultModel which delegates invalidate handling to ResultT. More...
struct  llvm::detail::AnalysisPassConcept< IRUnitT, AnalysisManagerT >
 Abstract concept of an analysis pass. More...
struct  llvm::detail::AnalysisPassModel< IRUnitT, AnalysisManagerT, PassT, true >
 Specialization of AnalysisPassModel which passes an AnalysisManager to PassT's run method. More...
struct  llvm::detail::AnalysisPassModel< IRUnitT, AnalysisManagerT, PassT, false >
 Specialization of AnalysisPassModel which does not pass an AnalysisManager to PassT's run method. More...
class  llvm::ModulePassManager
struct  llvm::ModulePassManager::ModulePassModel< PassT >
class  llvm::FunctionPassManager
struct  llvm::FunctionPassManager::FunctionPassModel< PassT >
class  llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >
 A CRTP base used to implement analysis managers. More...
class  llvm::ModuleAnalysisManager
 A module analysis pass manager with lazy running and caching of results. More...
class  llvm::FunctionAnalysisManager
 A function analysis manager to coordinate and cache analyses run over a module. 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...

Namespaces

namespace  llvm
 

List of target independent CodeGen pass IDs.


namespace  llvm::detail
 

Implementation details of the pass manager interfaces.


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.

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 IR/PassManager.h.