13#ifndef LLVM_PASSES_PASSPLUGIN_H
14#define LLVM_PASSES_PASSPLUGIN_H
33#define LLVM_PLUGIN_API_VERSION 1
88 : Filename(Filename), Library(Library), Info() {}
91 sys::DynamicLibrary Library;
92 PassPluginLibraryInfo Info;
#define LLVM_ATTRIBUTE_WEAK
PassBuilder PB(Machine, PassOpts->PTO, std::nullopt, &PIC)
::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK llvmGetPassPluginInfo()
The public entry point for a pass plugin.
Tagged union holding either a T or a Error.
This class provides access to building LLVM's passes.
static Expected< PassPlugin > Load(const std::string &Filename)
Attempts to load a pass plugin from a given file.
uint32_t getAPIVersion() const
Get the plugin API version.
void registerPassBuilderCallbacks(PassBuilder &PB) const
Invoke the PassBuilder callback registration.
StringRef getPluginVersion() const
Get the plugin version.
StringRef getPluginName() const
Get the plugin name.
StringRef getFilename() const
Get the filename of the loaded plugin.
StringRef - Represent a constant reference to a string, i.e.
This class provides a portable interface to dynamic libraries which also might be known as shared lib...
This is an optimization pass for GlobalISel generic memory operations.
Information about the plugin required to load its passes.
const char * PluginName
A meaningful name of the plugin.
uint32_t APIVersion
The API version understood by this plugin, usually LLVM_PLUGIN_API_VERSION.
void(* RegisterPassBuilderCallbacks)(PassBuilder &)
The callback for registering plugin passes with a PassBuilder instance.
const char * PluginVersion
The version of the plugin.