MLIR  20.0.0git
Classes | Namespaces | Functions
DialectPlugin.h File Reference
#include "mlir/IR/DialectRegistry.h"
#include "mlir/Tools/Plugins/PassPlugin.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/Error.h"
#include <cstdint>
#include <string>

Go to the source code of this file.

Classes

struct  mlir::DialectPluginLibraryInfo
 Information about the plugin required to load its dialects & passes. More...
 
class  mlir::DialectPlugin
 A loaded dialect plugin. More...
 

Namespaces

 mlir
 Include the generated interface declarations.
 

Functions

::mlir::DialectPluginLibraryInfo LLVM_ATTRIBUTE_WEAK mlirGetDialectPluginInfo ()
 The public entry point for a dialect plugin. More...
 

Function Documentation

◆ mlirGetDialectPluginInfo()

::mlir::DialectPluginLibraryInfo LLVM_ATTRIBUTE_WEAK mlirGetDialectPluginInfo ( )

The public entry point for a dialect plugin.

When a plugin is loaded by the driver, it will call this entry point to obtain information about this plugin and about how to register its dialects. This function needs to be implemented by the plugin, see the example below:

extern "C" ::mlir::DialectPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
return {
MLIR_PLUGIN_API_VERSION, "MyPlugin", "v0.1", [](DialectRegistry) { ... }
};
}
::mlir::DialectPluginLibraryInfo LLVM_ATTRIBUTE_WEAK mlirGetDialectPluginInfo()
The public entry point for a dialect plugin.
#define MLIR_PLUGIN_API_VERSION
\macro MLIR_PLUGIN_API_VERSION Identifies the API version understood by this plugin.
Definition: PassPlugin.h:32
Information about the plugin required to load its dialects & passes.
Definition: DialectPlugin.h:32

Referenced by mlir::DialectPlugin::load().