LLVM 17.0.0git
Public Member Functions | List of all members
llvm::RegisterAGBase Class Reference

RegisterAnalysisGroup - Register a Pass as a member of an analysis group. More...

#include "llvm/PassSupport.h"

Inheritance diagram for llvm::RegisterAGBase:
Inheritance graph
Collaboration diagram for llvm::RegisterAGBase:
Collaboration graph

Public Member Functions

 RegisterAGBase (StringRef Name, const void *InterfaceID, const void *PassID=nullptr, bool isDefault=false)
- Public Member Functions inherited from llvm::PassInfo
 PassInfo (StringRef name, StringRef arg, const void *pi, NormalCtor_t normal, bool isCFGOnly, bool is_analysis)
 PassInfo ctor - Do not call this directly, this should only be invoked through RegisterPass.
 PassInfo (StringRef name, const void *pi)
 PassInfo ctor - Do not call this directly, this should only be invoked through RegisterPass.
 PassInfo (const PassInfo &)=delete
PassInfooperator= (const PassInfo &)=delete
StringRef getPassName () const
 getPassName - Return the friendly name for the pass, never returns null
StringRef getPassArgument () const
 getPassArgument - Return the command line option that may be passed to 'opt' that will cause this pass to be run.
const void * getTypeInfo () const
 getTypeInfo - Return the id object for the pass... TODO : Rename
bool isPassID (const void *IDPtr) const
 Return true if this PassID implements the specified ID pointer.
bool isAnalysisGroup () const
 isAnalysisGroup - Return true if this is an analysis group, not a normal pass.
bool isAnalysis () const
bool isCFGOnlyPass () const
 isCFGOnlyPass - return true if this pass only looks at the CFG for the function.
NormalCtor_t getNormalCtor () const
 getNormalCtor - Return a pointer to a function, that when called, creates an instance of the pass and returns it.
void setNormalCtor (NormalCtor_t Ctor)
PasscreatePass () const
 createPass() - Use this method to create an instance of this pass.
void addInterfaceImplemented (const PassInfo *ItfPI)
 addInterfaceImplemented - This method is called when this pass is registered as a member of an analysis group with the RegisterAnalysisGroup template.
const std::vector< const PassInfo * > & getInterfacesImplemented () const
 getInterfacesImplemented - Return a list of all of the analysis group interfaces implemented by this pass.

Additional Inherited Members

- Public Types inherited from llvm::PassInfo
using NormalCtor_t = Pass *(*)()

Detailed Description

RegisterAnalysisGroup - Register a Pass as a member of an analysis group.

Analysis groups are used to define an interface (which need not derive from Pass) that is required by passes to do their job. Analysis Groups differ from normal analyses because any available implementation of the group will be used if it is available.

If no analysis implementing the interface is available, a default implementation is created and added. A pass registers itself as the default implementation by specifying 'true' as the second template argument of this class.

In addition to registering itself as an analysis group member, a pass must register itself normally as well. Passes may be members of multiple groups and may still be "required" specifically by name.

The actual interface may also be registered as well (by not specifying the second template argument). The interface should be registered to associate a nice name with the interface.

Definition at line 138 of file PassSupport.h.

Constructor & Destructor Documentation

◆ RegisterAGBase()

RegisterAGBase::RegisterAGBase ( StringRef  Name,
const void *  InterfaceID,
const void *  PassID = nullptr,
bool  isDefault = false 

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