LLVM 19.0.0git
Public Member Functions | List of all members
llvm::legacy::PassManager Class Reference

PassManager manages ModulePassManagers. More...

#include "llvm/IR/LegacyPassManager.h"

Inheritance diagram for llvm::legacy::PassManager:
Inheritance graph
[legend]

Public Member Functions

 PassManager ()
 Create new pass manager.
 
 ~PassManager () override
 
void add (Pass *P) override
 Add a pass to the queue of passes to run.
 
bool run (Module &M)
 run - Execute all of the passes scheduled for execution.
 
- Public Member Functions inherited from llvm::legacy::PassManagerBase
virtual ~PassManagerBase ()
 
virtual void add (Pass *P)=0
 Add a pass to the queue of passes to run.
 

Detailed Description

PassManager manages ModulePassManagers.

Definition at line 52 of file LegacyPassManager.h.

Constructor & Destructor Documentation

◆ PassManager()

llvm::legacy::PassManager::PassManager ( )

Create new pass manager.

Definition at line 1670 of file LegacyPassManager.cpp.

References llvm::PMDataManager::setTopLevelManager().

◆ ~PassManager()

llvm::legacy::PassManager::~PassManager ( )
override

Definition at line 1676 of file LegacyPassManager.cpp.

Member Function Documentation

◆ add()

void llvm::legacy::PassManager::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.

Reimplemented in llvm::DebugifyCustomPassManager.

Definition at line 1680 of file LegacyPassManager.cpp.

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

Referenced by llvm::DebugifyCustomPassManager::add(), and codegen().

◆ run()

bool llvm::legacy::PassManager::run ( Module M)

run - Execute all of the passes scheduled for execution.

Keep track of whether any of the passes modifies the module, and if so, return true.

Definition at line 1686 of file LegacyPassManager.cpp.

References llvm::legacy::PassManagerImpl::run().

Referenced by codegen(), llvm::MCJIT::emitObject(), and llvm::orc::SimpleCompiler::operator()().


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