class FunctionPass

Declaration

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

Description

FunctionPass class - This class is used to implement most global optimizations. Optimizations should subclass this class if they meet the following constraints: 1. Optimizations are organized globally, i.e., a function at a time 2. Optimizing a function does not cause the addition or removal of any functions in the module

Declared at: llvm/include/llvm/Pass.h:308

Inherits from: Pass

Member Variables

Method Overview

Inherited from Pass:

Methods

FunctionPass(char& pid)

Declared at: llvm/include/llvm/Pass.h:310

Parameters

char& pid

void assignPassManager(llvm::PMStack& PMS,
                       llvm::PassManagerType T)

Description

Each pass is responsible for assigning a pass manager to itself. PMS is the stack of available pass manager.

Declared at: llvm/include/llvm/Pass.h:320

Parameters

llvm::PMStack& PMS
llvm::PassManagerType T

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

Description

createPrinterPass - Get a function printer pass.

Declared at: llvm/include/llvm/Pass.h:313

Parameters

llvm::raw_ostream& OS
const std::string& Banner

llvm::PassManagerType
getPotentialPassManagerType() const

Description

Return what kind of Pass Manager can manage this pass.

Declared at: llvm/include/llvm/Pass.h:323

virtual bool runOnFunction(llvm::Function& F)

Description

runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.

Declared at: llvm/include/llvm/Pass.h:318

Parameters

llvm::Function& F

bool skipFunction(const llvm::Function& F) const

Description

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

Declared at: llvm/include/llvm/Pass.h:329

Parameters

const llvm::Function& F