LLVM API Documentation

llvm::PassInfo Class Reference

#include <PassSupport.h>

Inheritance diagram for llvm::PassInfo:

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

Collaboration graph
[legend]

List of all members.

Public Types

typedef Pass *(* NormalCtor_t )()

Public Member Functions

 PassInfo (const char *name, const char *arg, intptr_t pi, NormalCtor_t normal=0, bool isCFGOnly=false, bool is_analysis=false)
 PassInfo (const char *name, intptr_t pi)
const char * getPassName () const
const char * getPassArgument () const
intptr_t getTypeInfo () const
bool isAnalysisGroup () const
bool isAnalysis () const
bool isCFGOnlyPass () const
NormalCtor_t getNormalCtor () const
void setNormalCtor (NormalCtor_t Ctor)
PasscreatePass () const
 createPass() - Use this method to create an instance of this pass.
void addInterfaceImplemented (const PassInfo *ItfPI)
const std::vector< const
PassInfo * > & 
getInterfacesImplemented () const
const PassInfogetPassInfo () const

Protected Member Functions

void registerPass ()
void unregisterPass ()


Detailed Description

PassInfo class - An instance of this class exists for every pass known by the system, and can be obtained from a live Pass by calling its getPassInfo() method. These objects are set up by the RegisterPass<> template, defined below.

Definition at line 36 of file PassSupport.h.


Member Typedef Documentation


Constructor & Destructor Documentation

llvm::PassInfo::PassInfo ( const char *  name,
const char *  arg,
intptr_t  pi,
NormalCtor_t  normal = 0,
bool  isCFGOnly = false,
bool  is_analysis = false 
) [inline]

PassInfo ctor - Do not call this directly, this should only be invoked through RegisterPass.

Definition at line 54 of file PassSupport.h.

References registerPass().

llvm::PassInfo::PassInfo ( const char *  name,
intptr_t  pi 
) [inline]

PassInfo ctor - Do not call this directly, this should only be invoked through RegisterPass. This version is for use by analysis groups; it does not auto-register the pass.

Definition at line 65 of file PassSupport.h.


Member Function Documentation

const char* llvm::PassInfo::getPassName (  )  const [inline]

getPassName - Return the friendly name for the pass, never returns null

Definition at line 73 of file PassSupport.h.

Referenced by llvm::PassNameParser::passRegistered().

const char* llvm::PassInfo::getPassArgument (  )  const [inline]

getPassArgument - Return the command line option that may be passed to 'opt' that will cause this pass to be run. This will return null if there is no argument.

Definition at line 79 of file PassSupport.h.

Referenced by llvm::PassNameParser::ignorablePass(), llvm::PassArgFilter< Args >::operator()(), and llvm::PassNameParser::passRegistered().

intptr_t llvm::PassInfo::getTypeInfo (  )  const [inline]

getTypeInfo - Return the id object for the pass... TODO : Rename

Definition at line 83 of file PassSupport.h.

bool llvm::PassInfo::isAnalysisGroup (  )  const [inline]

isAnalysisGroup - Return true if this is an analysis group, not a normal pass.

Definition at line 88 of file PassSupport.h.

Referenced by createPass(), and llvm::RegisterAGBase::RegisterAGBase().

bool llvm::PassInfo::isAnalysis (  )  const [inline]

Definition at line 89 of file PassSupport.h.

Referenced by llvm::PMTopLevelManager::schedulePass().

bool llvm::PassInfo::isCFGOnlyPass (  )  const [inline]

isCFGOnlyPass - return true if this pass only looks at the CFG for the function.

Definition at line 93 of file PassSupport.h.

NormalCtor_t llvm::PassInfo::getNormalCtor (  )  const [inline]

getNormalCtor - Return a pointer to a function, that when called, creates an instance of the pass and returns it. This pointer may be null if there is no default constructor for the pass.

Definition at line 99 of file PassSupport.h.

Referenced by llvm::PassNameParser::ignorablePass().

void llvm::PassInfo::setNormalCtor ( NormalCtor_t  Ctor  )  [inline]

Definition at line 102 of file PassSupport.h.

Pass* llvm::PassInfo::createPass (  )  const [inline]

createPass() - Use this method to create an instance of this pass.

Definition at line 107 of file PassSupport.h.

References isAnalysisGroup().

void llvm::PassInfo::addInterfaceImplemented ( const PassInfo ItfPI  )  [inline]

addInterfaceImplemented - This method is called when this pass is registered as a member of an analysis group with the RegisterAnalysisGroup template.

Definition at line 119 of file PassSupport.h.

Referenced by llvm::RegisterAGBase::RegisterAGBase().

const std::vector<const PassInfo*>& llvm::PassInfo::getInterfacesImplemented (  )  const [inline]

getInterfacesImplemented - Return a list of all of the analysis group interfaces implemented by this pass.

Definition at line 126 of file PassSupport.h.

Referenced by llvm::PMTopLevelManager::findAnalysisPass().

const PassInfo* llvm::PassInfo::getPassInfo (  )  const [inline]

getPassInfo - Deprecated API compaatibility function. This function just returns 'this'.

Definition at line 133 of file PassSupport.h.

void PassInfo::registerPass (  )  [protected]

Definition at line 210 of file Pass.cpp.

References E, and getPassRegistrar().

Referenced by PassInfo(), and llvm::RegisterAGBase::RegisterAGBase().

void PassInfo::unregisterPass (  )  [protected]

Definition at line 220 of file Pass.cpp.

References getPassRegistrar().


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



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.