LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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, LLC = 4, AnalysisGroup = 8 }

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 36 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 
LLC 
AnalysisGroup 

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


Member Function Documentation

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

References AnalysisGroup.

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

Referenced by llvm::PassManagerT< Function >::getImmutablePassOrNull().

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

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

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

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

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

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

Definition at line 67 of file PassSupport.h.

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

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

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

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

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

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

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

Definition at line 78 of file PassSupport.h.

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

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

Definition at line 93 of file PassSupport.h.

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

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

Definition at line 68 of file PassSupport.h.

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


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