MLIR
18.0.0git
|
Base container class and manager for all pass options. More...
#include "mlir/Pass/PassOptions.h"
Classes | |
class | ListOption |
This class represents a specific pass option that contains a list of values of the provided data type. More... | |
class | Option |
This class represents a specific pass option, with a provided data type. More... | |
Public Types | |
template<typename DataType > | |
using | OptionParser = std::conditional_t< std::is_base_of< llvm::cl::generic_parser_base, llvm::cl::parser< DataType > >::value, GenericOptionParser< DataType >, llvm::cl::parser< DataType > > |
The specific parser to use depending on llvm::cl parser used. More... | |
Public Member Functions | |
PassOptions ()=default | |
PassOptions (const PassOptions &)=delete | |
Delete the copy constructor to avoid copying the internal options map. More... | |
PassOptions (PassOptions &&)=delete | |
void | copyOptionValuesFrom (const PassOptions &other) |
Copy the option values from 'other' into 'this', where 'other' has the same options as 'this'. More... | |
LogicalResult | parseFromString (StringRef options) |
Parse options out as key=value pairs that can then be handed off to the llvm::cl command line passing infrastructure. More... | |
void | print (raw_ostream &os) |
Print the options held by this struct in a form that can be parsed via 'parseFromString'. More... | |
void | printHelp (size_t indent, size_t descIndent) const |
Print the help string for the options held by this struct. More... | |
size_t | getOptionWidth () const |
Return the maximum width required when printing the help string. More... | |
Base container class and manager for all pass options.
Definition at line 79 of file PassOptions.h.
using mlir::detail::PassOptions::OptionParser = std::conditional_t<std::is_base_of<llvm::cl::generic_parser_base, llvm::cl::parser<DataType> >::value, GenericOptionParser<DataType>, llvm::cl::parser<DataType> > |
The specific parser to use depending on llvm::cl parser used.
This is only necessary because we need to provide additional methods for certain data type parsers. TODO: We should upstream the methods in GenericOptionParser to avoid the need to do this.
Definition at line 150 of file PassOptions.h.
|
default |
|
delete |
Delete the copy constructor to avoid copying the internal options map.
|
delete |
void detail::PassOptions::copyOptionValuesFrom | ( | const PassOptions & | other | ) |
Copy the option values from 'other' into 'this', where 'other' has the same options as 'this'.
Copy the option values from 'other'.
Definition at line 199 of file PassRegistry.cpp.
size_t detail::PassOptions::getOptionWidth | ( | ) | const |
Return the maximum width required when printing the help string.
Definition at line 341 of file PassRegistry.cpp.
LogicalResult detail::PassOptions::parseFromString | ( | StringRef | options | ) |
Parse options out as key=value pairs that can then be handed off to the llvm::cl
command line passing infrastructure.
Everything is space separated.
Definition at line 279 of file PassRegistry.cpp.
References mlir::failure(), options, parseNextArg(), and mlir::success().
void detail::PassOptions::print | ( | raw_ostream & | os | ) |
Print the options held by this struct in a form that can be parsed via 'parseFromString'.
Definition at line 302 of file PassRegistry.cpp.
References options.
void detail::PassOptions::printHelp | ( | size_t | indent, |
size_t | descIndent | ||
) | const |
Print the help string for the options held by this struct.
descIndent
is the indent that the descriptions should be aligned.
descIndent
is the indent within the stream that the descriptions should be aligned.
Definition at line 323 of file PassRegistry.cpp.
References options.