|
LLVM
3.7.0
|
Trivial adaptor that maps from a module to its functions. More...
#include <PassManager.h>
Public Member Functions | |
| ModuleToFunctionPassAdaptor (FunctionPassT Pass) | |
| ModuleToFunctionPassAdaptor (const ModuleToFunctionPassAdaptor &Arg) | |
| ModuleToFunctionPassAdaptor (ModuleToFunctionPassAdaptor &&Arg) | |
| ModuleToFunctionPassAdaptor & | operator= (ModuleToFunctionPassAdaptor RHS) |
| PreservedAnalyses | run (Module &M, ModuleAnalysisManager *AM) |
| Runs the function pass across every function in the module. More... | |
Static Public Member Functions | |
| static StringRef | name () |
Friends | |
| void | swap (ModuleToFunctionPassAdaptor &LHS, ModuleToFunctionPassAdaptor &RHS) |
Trivial adaptor that maps from a module to its functions.
Designed to allow composition of a FunctionPass(Manager) and a ModulePassManager. Note that if this pass is constructed with a pointer to a ModuleAnalysisManager it will run the FunctionAnalysisManagerModuleProxy analysis prior to running the function pass over the module to enable a FunctionAnalysisManager to be used within this run safely.
Function passes run within this adaptor can rely on having exclusive access to the function they are run over. They should not read or modify any other functions! Other threads or systems may be manipulating other functions in the module, and so their state should never be relied on. FIXME: Make the above true for all of LLVM's actual passes, some still violate this principle.
Function passes can also read the module containing the function, but they should not modify that module outside of the use lists of various globals. For example, a function pass is not permitted to add functions to the module. FIXME: Make the above true for all of LLVM's actual passes, some still violate this principle.
Definition at line 764 of file PassManager.h.
|
inlineexplicit |
Definition at line 766 of file PassManager.h.
|
inline |
Definition at line 770 of file PassManager.h.
|
inline |
Definition at line 772 of file PassManager.h.
|
inlinestatic |
Definition at line 819 of file PassManager.h.
|
inline |
Definition at line 779 of file PassManager.h.
References llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::swap.
|
inline |
Runs the function pass across every function in the module.
Definition at line 785 of file PassManager.h.
References llvm::PreservedAnalyses::all(), F(), llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::getResult(), llvm::PreservedAnalyses::intersect(), llvm::detail::AnalysisManagerBase< DerivedT, IRUnitT >::invalidate(), and llvm::PreservedAnalyses::preserve().
|
friend |
Definition at line 774 of file PassManager.h.
Referenced by llvm::ModuleToFunctionPassAdaptor< FunctionPassT >::operator=().
1.8.6