MLIR  16.0.0git
Classes | Namespaces | Functions | Variables
PassRegistry.cpp File Reference
#include <utility>
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Pass/PassRegistry.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
+ Include dependency graph for PassRegistry.cpp:

Go to the source code of this file.

Classes

struct  llvm::cl::OptionValue< PassArgData >
 Define a valid OptionValue for the command line pass argument. More...
 
struct  mlir::detail::PassPipelineCLParserImpl
 

Namespaces

 llvm
 The OpAsmOpInterface, see OpAsmInterface.td for more details.
 
 llvm::cl
 
 mlir
 Include the generated interface declarations.
 
 mlir::detail
 

Functions

static PassRegistryFunction buildDefaultRegistryFn (const PassAllocatorFunction &allocator)
 Utility to create a default registry function from a pass instance. More...
 
static void printOptionHelp (StringRef arg, StringRef desc, size_t indent, size_t descIndent, bool isTopLevel)
 Utility to print the help string for a specific option. More...
 
static std::tuple< StringRef, StringRef, StringRef > parseNextArg (StringRef options)
 Parse in the next argument from the given options string. More...
 

Variables

static llvm::ManagedStatic< llvm::StringMap< PassInfo > > passRegistry
 Static mapping of all of the registered passes. More...
 
static llvm::ManagedStatic< llvm::StringMap< TypeID > > passRegistryTypeIDs
 A mapping of the above pass registry entries to the corresponding TypeID of the pass that they generate. More...
 
static llvm::ManagedStatic< llvm::StringMap< PassPipelineInfo > > passPipelineRegistry
 Static mapping of all of the registered pass pipelines. More...
 

Function Documentation

◆ buildDefaultRegistryFn()

static PassRegistryFunction buildDefaultRegistryFn ( const PassAllocatorFunction allocator)
static

Utility to create a default registry function from a pass instance.

Definition at line 36 of file PassRegistry.cpp.

References mlir::OpPassManager::addPass(), mlir::OpPassManager::Explicit, mlir::OpPassManager::getNesting(), mlir::OpPassManager::getOpAnchorName(), mlir::OpPassManager::getOpName(), and options.

◆ parseNextArg()

static std::tuple<StringRef, StringRef, StringRef> parseNextArg ( StringRef  options)
static

Parse in the next argument from the given options string.

Returns a tuple containing [the key of the option, the value of the option, updated options string pointing after the parsed option].

Definition at line 202 of file PassRegistry.cpp.

References value.

Referenced by mlir::detail::PassOptions::parseFromString().

◆ printOptionHelp()

static void printOptionHelp ( StringRef  arg,
StringRef  desc,
size_t  indent,
size_t  descIndent,
bool  isTopLevel 
)
static

Utility to print the help string for a specific option.

Definition at line 57 of file PassRegistry.cpp.

Referenced by mlir::PassRegistryEntry::printHelpStr().

Variable Documentation

◆ passPipelineRegistry

llvm::ManagedStatic<llvm::StringMap<PassPipelineInfo> > passPipelineRegistry
static

Static mapping of all of the registered pass pipelines.

Definition at line 32 of file PassRegistry.cpp.

Referenced by mlir::PassRegistryEntry::getOptionWidth().

◆ passRegistry

llvm::ManagedStatic<llvm::StringMap<PassInfo> > passRegistry
static

Static mapping of all of the registered passes.

Definition at line 24 of file PassRegistry.cpp.

Referenced by mlir::Pass::lookupPassInfo(), and mlir::registerPass().

◆ passRegistryTypeIDs

llvm::ManagedStatic<llvm::StringMap<TypeID> > passRegistryTypeIDs
static

A mapping of the above pass registry entries to the corresponding TypeID of the pass that they generate.

Definition at line 28 of file PassRegistry.cpp.

Referenced by mlir::registerPass().