LLVM 18.0.0git
Classes | Namespaces | Typedefs | Functions | Variables
PassManager.h File Reference

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

#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.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/PassInstrumentation.h"
#include "llvm/IR/PassManagerInternal.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/TypeName.h"
#include <cassert>
#include <cstring>
#include <iterator>
#include <list>
#include <memory>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.


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...
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::PassInstrumentationAnalysis
 Pseudo-analysis pass that exposes the PassInstrumentation to pass managers. 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
 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...


namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
namespace  llvm::detail


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


template<class IRUnitT >
bool llvm::shouldConvertDbgInfo (IRUnitT &IR)
bool llvm::shouldConvertDbgInfo (Module &IR)
template<class IRUnitT >
void llvm::doConvertDbgInfoToNew (IRUnitT &IR)
void llvm::doConvertDbgInfoToNew (Module &IR)
template<class IRUnitT >
void llvm::doConvertDebugInfoToOld (IRUnitT &IR)
void llvm::doConvertDebugInfoToOld (Module &IR)
template<typename PassT , typename IRUnitT , typename AnalysisManagerT , typename... ArgTs, size_t... Ns>
PassT::Result llvm::detail::getAnalysisResultUnpackTuple (AnalysisManagerT &AM, IRUnitT &IR, std::tuple< ArgTs... > Args, std::index_sequence< Ns... >)
 Actual unpacker of extra arguments in getAnalysisResult, passes only those tuple arguments that are mentioned in index_sequence.
template<typename PassT , typename IRUnitT , typename... AnalysisArgTs, typename... MainArgTs>
PassT::Result llvm::detail::getAnalysisResult (AnalysisManager< IRUnitT, AnalysisArgTs... > &AM, IRUnitT &IR, std::tuple< MainArgTs... > Args)
 Helper for partial unpacking of extra arguments in getAnalysisResult.
template<typename FunctionPassT >
ModuleToFunctionPassAdaptor llvm::createModuleToFunctionPassAdaptor (FunctionPassT &&Pass, bool EagerlyInvalidate=false)
 A function to deduce a function pass type and wrap it in the templated adaptor.
template<typename PassT >
RepeatedPass< PassT > llvm::createRepeatedPass (int Count, PassT &&P)


llvm::cl::opt< boolUseNewDbgInfoFormat

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.

Variable Documentation

◆ UseNewDbgInfoFormat

llvm::cl::opt<bool> UseNewDbgInfoFormat