MLIR
20.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_v< PassOptions, DataType >, PassOptionsParser< DataType >, 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. 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, raw_ostream &errorStream=llvm::errs()) |
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) const |
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 92 of file PassOptions.h.
using mlir::detail::PassOptions::OptionParser = std::conditional_t< std::is_base_of_v<PassOptions, DataType>, PassOptionsParser<DataType>, 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.
This is necessary because we need to provide additional methods for certain data type parsers.
Definition at line 179 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 272 of file PassRegistry.cpp.
Referenced by mlir::Pass::copyOptionValuesFrom().
size_t detail::PassOptions::getOptionWidth | ( | ) | const |
Return the maximum width required when printing the help string.
Definition at line 408 of file PassRegistry.cpp.
LogicalResult detail::PassOptions::parseFromString | ( | StringRef | options, |
raw_ostream & | errorStream = llvm::errs() |
||
) |
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 345 of file PassRegistry.cpp.
References options, and parseNextArg().
Referenced by mlir::Pass::initializeOptions().
void detail::PassOptions::print | ( | raw_ostream & | os | ) | const |
Print the options held by this struct in a form that can be parsed via 'parseFromString'.
Definition at line 369 of file PassRegistry.cpp.
References options.
Referenced by mlir::Pass::printAsTextualPipeline().
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 390 of file PassRegistry.cpp.
References options.