LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::legacy::FunctionPassManager Class Reference

FunctionPassManager manages FunctionPasses and BasicBlockPassManagers. More...

#include <LegacyPassManager.h>

Inheritance diagram for llvm::legacy::FunctionPassManager:
Inheritance graph
[legend]
Collaboration diagram for llvm::legacy::FunctionPassManager:
Collaboration graph
[legend]

Public Member Functions

 FunctionPassManager (Module *M)
 Create new Function pass manager. More...
 
 ~FunctionPassManager ()
 
void add (Pass *P)
 
bool run (Function &F)
 
bool doInitialization ()
 
bool doFinalization ()
 
- Public Member Functions inherited from llvm::legacy::PassManagerBase
virtual ~PassManagerBase ()
 

Detailed Description

FunctionPassManager manages FunctionPasses and BasicBlockPassManagers.

Definition at line 71 of file LegacyPassManager.h.

Constructor & Destructor Documentation

FunctionPassManager::FunctionPassManager ( Module M)
explicit

Create new Function pass manager.

FunctionPassManager ctor - This initializes the pass manager. It needs, but does not take ownership of, the specified Module.

Definition at line 1375 of file LegacyPassManager.cpp.

References llvm::Pass::setResolver(), and llvm::PMDataManager::setTopLevelManager().

FunctionPassManager::~FunctionPassManager ( )

Definition at line 1384 of file LegacyPassManager.cpp.

Member Function Documentation

void FunctionPassManager::add ( Pass P)
virtual

add - Add a pass to the queue of passes to run. This passes ownership of the Pass to the PassManager. When the PassManager_X is destroyed, the pass will be destroyed as well, so there is no need to delete the pass. This implies that all passes MUST be allocated with 'new'.

add - Add a pass to the queue of passes to run. This passes ownership of the Pass to the PassManager. When the PassManager_X is destroyed, the pass will be destroyed as well, so there is no need to delete the pass. (TODO delete passes.) This implies that all passes MUST be allocated with 'new'.

Implements llvm::legacy::PassManagerBase.

Definition at line 1393 of file LegacyPassManager.cpp.

References llvm::legacy::FunctionPassManagerImpl::add().

bool FunctionPassManager::doFinalization ( )

doFinalization - Run all of the finalizers for the function passes.

Definition at line 1419 of file LegacyPassManager.cpp.

References llvm::legacy::FunctionPassManagerImpl::doFinalization().

bool FunctionPassManager::doInitialization ( )

doInitialization - Run all of the initializers for the function passes.

Definition at line 1413 of file LegacyPassManager.cpp.

References llvm::legacy::FunctionPassManagerImpl::doInitialization().

bool FunctionPassManager::run ( Function F)

run - Execute all of the passes scheduled for execution. Keep track of whether any of the passes modifies the function, and if so, return true.

Definition at line 1401 of file LegacyPassManager.cpp.

References llvm::GlobalValue::isMaterializable(), llvm::GlobalValue::Materialize(), llvm::report_fatal_error(), and llvm::legacy::FunctionPassManagerImpl::run().


The documentation for this class was generated from the following files: