LLVM API Documentation

Public Member Functions
llvm::RegionPass Class Reference

A pass that runs on each Region in a function. More...

#include <RegionPass.h>

Inheritance diagram for llvm::RegionPass:
Inheritance graph
[legend]
Collaboration diagram for llvm::RegionPass:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RegionPass (char &pid)
To be implemented by every RegionPass
virtual bool runOnRegion (Region *R, RGPassManager &RGM)=0
 Run the pass on a specific Region.
PasscreatePrinterPass (raw_ostream &O, const std::string &Banner) const override
 Get a pass to print the LLVM IR in the region.
virtual bool doInitialization (Region *R, RGPassManager &RGM)
virtual bool doFinalization ()
PassManager API
void preparePassManager (PMStack &PMS) override
 Check if available pass managers are suitable for this pass or not.
void assignPassManager (PMStack &PMS, PassManagerType PMT=PMT_RegionPassManager) override
 Assign pass manager to manage this pass.
PassManagerType getPotentialPassManagerType () const override
 Return what kind of Pass Manager can manage this pass.

Detailed Description

A pass that runs on each Region in a function.

RegionPass is managed by RGPassManager.

Definition at line 34 of file RegionPass.h.


Constructor & Destructor Documentation

llvm::RegionPass::RegionPass ( char &  pid) [inline, explicit]

Definition at line 36 of file RegionPass.h.


Member Function Documentation

void RegionPass::assignPassManager ( PMStack PMS,
PassManagerType  PMT = PMT_RegionPassManager 
) [override, virtual]
Pass * RegionPass::createPrinterPass ( raw_ostream O,
const std::string &  Banner 
) const [override, virtual]

Get a pass to print the LLVM IR in the region.

Get the printer pass.

Parameters:
OThe output stream to print the Region.
BannerThe banner to separate different printed passes.
Returns:
The pass to print the LLVM IR in the region.

Implements llvm::Pass.

Definition at line 275 of file RegionPass.cpp.

virtual bool llvm::RegionPass::doFinalization ( ) [inline, virtual]

Definition at line 65 of file RegionPass.h.

Referenced by llvm::RGPassManager::runOnFunction().

virtual bool llvm::RegionPass::doInitialization ( Region R,
RGPassManager RGM 
) [inline, virtual]

Definition at line 64 of file RegionPass.h.

Referenced by llvm::RGPassManager::runOnFunction().

PassManagerType llvm::RegionPass::getPotentialPassManagerType ( ) const [inline, override, virtual]

Return what kind of Pass Manager can manage this pass.

Reimplemented from llvm::Pass.

Definition at line 77 of file RegionPass.h.

References llvm::PMT_RegionPassManager.

void RegionPass::preparePassManager ( PMStack ) [override, virtual]

Check if available pass managers are suitable for this pass or not.

Reimplemented from llvm::Pass.

Definition at line 221 of file RegionPass.cpp.

References llvm::PMStack::empty(), llvm::PMDataManager::getPassManagerType(), llvm::PMT_RegionPassManager, llvm::PMStack::pop(), llvm::PMDataManager::preserveHigherLevelAnalysis(), and llvm::PMStack::top().

virtual bool llvm::RegionPass::runOnRegion ( Region R,
RGPassManager RGM 
) [pure virtual]

Run the pass on a specific Region.

Accessing regions not contained in the current region is not allowed.

Parameters:
RThe region this pass is run on.
RGMThe RegionPassManager that manages this Pass.
Returns:
True if the pass modifies this Region.

Referenced by llvm::RGPassManager::runOnFunction().


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