LLVM API Documentation

Public Member Functions | Protected Member Functions
llvm::FunctionPass Class Reference

#include <Pass.h>

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

List of all members.

Public Member Functions

 FunctionPass (char &pid)
PasscreatePrinterPass (raw_ostream &O, const std::string &Banner) const override
 createPrinterPass - Get a function printer pass.
virtual bool runOnFunction (Function &F)=0
void assignPassManager (PMStack &PMS, PassManagerType T) override
PassManagerType getPotentialPassManagerType () const override
 Return what kind of Pass Manager can manage this pass.

Protected Member Functions

bool skipOptnoneFunction (const Function &F) const

Detailed 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

Definition at line 294 of file Pass.h.


Constructor & Destructor Documentation

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

Definition at line 296 of file Pass.h.


Member Function Documentation

void FunctionPass::assignPassManager ( PMStack PMS,
PassManagerType  PreferredType 
) [override, virtual]
Pass * FunctionPass::createPrinterPass ( raw_ostream O,
const std::string &  Banner 
) const [override, virtual]

createPrinterPass - Get a function printer pass.

Implements llvm::Pass.

Definition at line 134 of file Pass.cpp.

References llvm::createPrintFunctionPass().

Return what kind of Pass Manager can manage this pass.

Reimplemented from llvm::Pass.

Definition at line 139 of file Pass.cpp.

References llvm::PMT_FunctionPassManager.

virtual bool llvm::FunctionPass::runOnFunction ( Function F) [pure virtual]

skipOptnoneFunction - This function has Attribute::OptimizeNone and most transformation passes should skip it.

Definition at line 143 of file Pass.cpp.

References llvm::dbgs(), DEBUG, llvm::Value::getName(), llvm::Pass::getPassName(), llvm::Function::hasFnAttribute(), and llvm::Attribute::OptimizeNone.


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