MLIR  20.0.0git
Public Member Functions | Protected Member Functions | List of all members
mlir::PassRegistryEntry Class Reference

Structure to group information about a passes and pass pipelines (argument to invoke via mlir-opt, description, pass pipeline builder). More...

#include "mlir/Pass/PassRegistry.h"

+ Inheritance diagram for mlir::PassRegistryEntry:

Public Member Functions

LogicalResult addToPipeline (OpPassManager &pm, StringRef options, function_ref< LogicalResult(const Twine &)> errorHandler) const
 Adds this pass registry entry to the given pass manager. More...
 
StringRef getPassArgument () const
 Returns the command line option that may be passed to 'mlir-opt' that will cause this pass to run or null if there is no such argument. More...
 
StringRef getPassDescription () const
 Returns a description for the pass, this never returns null. More...
 
void printHelpStr (size_t indent, size_t descIndent) const
 Print the help information for this pass. More...
 
size_t getOptionWidth () const
 Return the maximum width required when printing the options of this entry. More...
 

Protected Member Functions

 PassRegistryEntry (StringRef arg, StringRef description, const PassRegistryFunction &builder, std::function< void(function_ref< void(const detail::PassOptions &)>)> optHandler)
 

Detailed Description

Structure to group information about a passes and pass pipelines (argument to invoke via mlir-opt, description, pass pipeline builder).

Definition at line 52 of file PassRegistry.h.

Constructor & Destructor Documentation

◆ PassRegistryEntry()

mlir::PassRegistryEntry::PassRegistryEntry ( StringRef  arg,
StringRef  description,
const PassRegistryFunction builder,
std::function< void(function_ref< void(const detail::PassOptions &)>)>  optHandler 
)
inlineprotected

Definition at line 81 of file PassRegistry.h.

Member Function Documentation

◆ addToPipeline()

LogicalResult mlir::PassRegistryEntry::addToPipeline ( OpPassManager pm,
StringRef  options,
function_ref< LogicalResult(const Twine &)>  errorHandler 
) const
inline

Adds this pass registry entry to the given pass manager.

options is an opaque string that will be parsed by the builder. The success of parsing will be returned.

Definition at line 58 of file PassRegistry.h.

References options.

◆ getOptionWidth()

size_t PassRegistryEntry::getOptionWidth ( ) const

Return the maximum width required when printing the options of this entry.

Definition at line 112 of file PassRegistry.cpp.

References options.

◆ getPassArgument()

StringRef mlir::PassRegistryEntry::getPassArgument ( ) const
inline

Returns the command line option that may be passed to 'mlir-opt' that will cause this pass to run or null if there is no such argument.

Definition at line 67 of file PassRegistry.h.

◆ getPassDescription()

StringRef mlir::PassRegistryEntry::getPassDescription ( ) const
inline

Returns a description for the pass, this never returns null.

Definition at line 70 of file PassRegistry.h.

◆ printHelpStr()

void PassRegistryEntry::printHelpStr ( size_t  indent,
size_t  descIndent 
) const

Print the help information for this pass.

This includes the argument, description, and any pass options. descIndent is the indent that the descriptions should be aligned.

Definition at line 101 of file PassRegistry.cpp.

References options, and printOptionHelp().


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