LLVM API Documentation

llvm::PassInfo Class Reference

#include <PassSupport.h>

Collaboration diagram for llvm::PassInfo:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { Analysis = 1, Optimization = 2, AnalysisGroup = 4 }

Public Member Functions

 PassInfo (const char *name, const char *arg, const std::type_info &ti, unsigned char pt, Pass *(*normal)()=0, Pass *(*targetctor)(TargetMachine &)=0)
const char * getPassName () const
void setPassName (const char *Name)
const char * getPassArgument () const
const std::type_info & getTypeInfo () const
unsigned getPassType () const
Pass *(* getNormalCtor () const)()
void setNormalCtor (Pass *(*Ctor)())
PasscreatePass () const
 createPass() - Use this method to create an instance of this pass.
Pass *(* getTargetCtor () const)(TargetMachine &)
void addInterfaceImplemented (const PassInfo *ItfPI)
const std::vector< const PassInfo * > & getInterfacesImplemented () const

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 37 of file PassSupport.h.


Member Enumeration Documentation

anonymous enum

PassType - Define symbolic constants that can be used to test to see if this pass should be listed by analyze or opt. Passes can use none, one or many of these flags or'd together. It is not legal to combine the AnalysisGroup flag with others.

Enumerator:
Analysis 
Optimization 
AnalysisGroup 

Definition at line 53 of file PassSupport.h.


Constructor & Destructor Documentation

llvm::PassInfo::PassInfo ( const char *  name,
const char *  arg,
const std::type_info &  ti,
unsigned char  pt,
Pass *(*)()  normal = 0,
Pass *(*)(TargetMachine &)  targetctor = 0 
) [inline]

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

Definition at line 59 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 68 of file PassSupport.h.

Referenced by llvm::PassNameParser::passRegistered(), and llvm::RegisterAGBase::setGroupName().

void llvm::PassInfo::setPassName ( const char *  Name  )  [inline]

Definition at line 69 of file PassSupport.h.

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

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 75 of file PassSupport.h.

Referenced by llvm::PassNameParser::ignorablePass(), llvm::PassNameParser::passRegistered(), and llvm::PassNameParser::passUnregistered().

const std::type_info& llvm::PassInfo::getTypeInfo (  )  const [inline]

getTypeInfo - Return the type_info object for the pass...

Definition at line 79 of file PassSupport.h.

Referenced by llvm::RegisterPassBase::registerPass(), and llvm::RegisterPassBase::unregisterPass().

unsigned llvm::PassInfo::getPassType (  )  const [inline]

getPassType - Return the PassType of a pass. Note that this can be several different types or'd together. This is _strictly_ for use by opt, analyze and llc for deciding which passes to use as command line options.

Definition at line 85 of file PassSupport.h.

Referenced by llvm::FilteredPassNameParser< Flags >::ignorablePassImpl(), llvm::RegisterAGBase::RegisterAGBase(), and llvm::RegisterPassBase::~RegisterPassBase().

Pass*(* llvm::PassInfo::getNormalCtor (  )  [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 91 of file PassSupport.h.

Referenced by llvm::PassNameParser::ignorablePass(), and llvm::RegisterAGBase::RegisterAGBase().

void llvm::PassInfo::setNormalCtor ( Pass *(*)()  Ctor  )  [inline]

Definition at line 94 of file PassSupport.h.

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

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

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

Definition at line 99 of file PassSupport.h.

References AnalysisGroup.

Pass*(* llvm::PassInfo::getTargetCtor (  )  [inline]

getTargetCtor - Return a pointer to a function that creates an instance of the pass and returns it. This returns a constructor for a version of the pass that takes a TargetMachine object as a parameter.

Definition at line 111 of file PassSupport.h.

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

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.


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