MLIR  19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::PassPlugin Class Reference

A loaded pass plugin. More...

#include "mlir/Tools/Plugins/PassPlugin.h"

Public Member Functions

StringRef getFilename () const
 Get the filename of the loaded plugin. More...
 
StringRef getPluginName () const
 Get the plugin name. More...
 
StringRef getPluginVersion () const
 Get the plugin version. More...
 
uint32_t getAPIVersion () const
 Get the plugin API version. More...
 
void registerPassRegistryCallbacks () const
 Invoke the PassRegistry callback registration. More...
 

Static Public Member Functions

static llvm::Expected< PassPluginload (const std::string &filename)
 Attempts to load a pass plugin from a given file. More...
 

Detailed Description

A loaded pass plugin.

An instance of this class wraps a loaded pass plugin and gives access to its interface defined by the PassPluginLibraryInfo it exposes.

Definition at line 58 of file PassPlugin.h.

Member Function Documentation

◆ getAPIVersion()

uint32_t mlir::PassPlugin::getAPIVersion ( ) const
inline

Get the plugin API version.

Definition at line 77 of file PassPlugin.h.

References mlir::PassPluginLibraryInfo::apiVersion.

◆ getFilename()

StringRef mlir::PassPlugin::getFilename ( ) const
inline

Get the filename of the loaded plugin.

Definition at line 68 of file PassPlugin.h.

◆ getPluginName()

StringRef mlir::PassPlugin::getPluginName ( ) const
inline

Get the plugin name.

Definition at line 71 of file PassPlugin.h.

References mlir::PassPluginLibraryInfo::pluginName.

◆ getPluginVersion()

StringRef mlir::PassPlugin::getPluginVersion ( ) const
inline

Get the plugin version.

Definition at line 74 of file PassPlugin.h.

References mlir::PassPluginLibraryInfo::pluginVersion.

◆ load()

llvm::Expected< PassPlugin > PassPlugin::load ( const std::string &  filename)
static

Attempts to load a pass plugin from a given file.

Returns
Returns an error if either the library cannot be found or loaded, there is no public entry point, or the plugin implements the wrong API version.

Definition at line 16 of file PassPlugin.cpp.

References MLIR_PLUGIN_API_VERSION, and mlirGetPassPluginInfo().

◆ registerPassRegistryCallbacks()

void mlir::PassPlugin::registerPassRegistryCallbacks ( ) const
inline

Invoke the PassRegistry callback registration.

Definition at line 80 of file PassPlugin.h.

References mlir::PassPluginLibraryInfo::registerPassRegistryCallbacks.


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