class RegionPass

Declaration

class RegionPass : public Pass { /* full declaration omitted */ };

Description

A pass that runs on each Region in a function. RegionPass is managed by RGPassManager.

Declared at: llvm/include/llvm/Analysis/RegionPass.h:33

Inherits from: Pass

Method Overview

Inherited from Pass:

Methods

RegionPass(char& pid)

Declared at: llvm/include/llvm/Analysis/RegionPass.h:35

Parameters

char& pid

void assignPassManager(llvm::PMStack& PMS,
                       llvm::PassManagerType PMT =
                           PMT_RegionPassManager)

Description

Assign pass manager to manage this pass.

Declared at: llvm/include/llvm/Analysis/RegionPass.h:73

Parameters

llvm::PMStack& PMS
llvm::PassManagerType PMT = PMT_RegionPassManager

llvm::Pass* createPrinterPass(
    llvm::raw_ostream& O,
    const std::string& Banner) const

Description

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

Declared at: llvm/include/llvm/Analysis/RegionPass.h:57

Parameters

llvm::raw_ostream& O
The output stream to print the Region.
const std::string& Banner
The banner to separate different printed passes.

Returns

The pass to print the LLVM IR in the region.

virtual bool doFinalization()

Declared at: llvm/include/llvm/Analysis/RegionPass.h:64

virtual bool doInitialization(
    llvm::Region* R,
    llvm::RGPassManager& RGM)

Declared at: llvm/include/llvm/Analysis/RegionPass.h:63

Parameters

llvm::Region* R
llvm::RGPassManager& RGM

llvm::PassManagerType
getPotentialPassManagerType() const

Description

Return what kind of Pass Manager can manage this pass.

Declared at: llvm/include/llvm/Analysis/RegionPass.h:76

void preparePassManager(llvm::PMStack& PMS)

Description

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

Declared at: llvm/include/llvm/Analysis/RegionPass.h:71

Parameters

llvm::PMStack& PMS

virtual bool runOnRegion(llvm::Region* R,
                         llvm::RGPassManager& RGM)

Description

Run the pass on a specific Region Accessing regions not contained in the current region is not allowed.

Declared at: llvm/include/llvm/Analysis/RegionPass.h:49

Parameters

llvm::Region* R
The region this pass is run on.
llvm::RGPassManager& RGM
The RegionPassManager that manages this Pass.

Returns

True if the pass modifies this Region.

bool skipRegion(llvm::Region& R) const

Description

Optional passes call this function to check whether the pass should be skipped. This is the case when optimization bisect is over the limit.

Declared at: llvm/include/llvm/Analysis/RegionPass.h:84

Parameters

llvm::Region& R