LLVM  14.0.0git
Public Member Functions | List of all members
llvm::legacy::FunctionPassManager Class Reference

FunctionPassManager manages FunctionPasses. More...

#include "llvm/IR/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)
 FunctionPassManager ctor - This initializes the pass manager. More...
 
 ~FunctionPassManager () override
 
void add (Pass *P) override
 Add a pass to the queue of passes to run. More...
 
bool run (Function &F)
 run - Execute all of the passes scheduled for execution. More...
 
bool doInitialization ()
 doInitialization - Run all of the initializers for the function passes. More...
 
bool doFinalization ()
 doFinalization - Run all of the finalizers for the function passes. More...
 
- Public Member Functions inherited from llvm::legacy::PassManagerBase
virtual ~PassManagerBase ()
 

Detailed Description

FunctionPassManager manages FunctionPasses.

Definition at line 71 of file LegacyPassManager.h.

Constructor & Destructor Documentation

◆ FunctionPassManager()

llvm::legacy::FunctionPassManager::FunctionPassManager ( Module M)
explicit

FunctionPassManager ctor - This initializes the pass manager.

Create new Function pass manager.

It needs, but does not take ownership of, the specified Module.

Definition at line 1331 of file LegacyPassManager.cpp.

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

◆ ~FunctionPassManager()

llvm::legacy::FunctionPassManager::~FunctionPassManager ( )
override

Definition at line 1340 of file LegacyPassManager.cpp.

Member Function Documentation

◆ add()

void llvm::legacy::FunctionPassManager::add ( Pass P)
overridevirtual

Add a pass to the queue of passes to run.

This passes ownership of the Pass to the PassManager. When the PassManager is destroyed, the pass will be destroyed as well, so there is no need to delete the pass. This may even destroy the pass right away if it is found to be redundant. This implies that all passes MUST be allocated with 'new'.

Implements llvm::legacy::PassManagerBase.

Definition at line 1344 of file LegacyPassManager.cpp.

References llvm::legacy::FunctionPassManagerImpl::add(), and P.

Referenced by invokeFunctionPass(), llvm::lintFunction(), llvm::PassManagerBuilder::populateFunctionPassManager(), and simplifyCFG().

◆ doFinalization()

bool llvm::legacy::FunctionPassManager::doFinalization ( )

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

Definition at line 1368 of file LegacyPassManager.cpp.

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

Referenced by invokeFunctionPass(), and simplifyCFG().

◆ doInitialization()

bool llvm::legacy::FunctionPassManager::doInitialization ( )

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

Definition at line 1362 of file LegacyPassManager.cpp.

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

Referenced by invokeFunctionPass(), and simplifyCFG().

◆ run()

bool llvm::legacy::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 1352 of file LegacyPassManager.cpp.

References F, llvm::handleAllErrors(), and llvm::legacy::FunctionPassManagerImpl::run().

Referenced by invokeFunctionPass(), llvm::lintFunction(), and simplifyCFG().


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