|
MLIR 22.0.0git
|
This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom printAttribute/printType() method on a dialect. More...
#include "mlir/IR/DialectImplementation.h"
Public Member Functions | |
| ~DialectAsmPrinter () override | |
| AsmPrinter (Impl &impl) | |
| Initialize the printer with the given internal implementation. | |
| AsmPrinter ()=default | |
| Initialize the printer with no internal implementation. | |
| Public Member Functions inherited from mlir::AsmPrinter | |
| AsmPrinter (Impl &impl) | |
| Initialize the printer with the given internal implementation. | |
| virtual | ~AsmPrinter () |
| virtual raw_ostream & | getStream () const |
| Return the raw output stream used by this printer. | |
| virtual void | printFloat (const APFloat &value) |
| Print the given floating point value in a stabilized form that can be roundtripped through the IR. | |
| template<typename IntT> | |
| std::enable_if_t< std::is_integral_v< IntT >, void > | printInteger (IntT value) |
| Print the given integer value. | |
| virtual void | printType (Type type) |
| virtual void | printAttribute (Attribute attr) |
| template<typename AttrOrType, std::enable_if_t< detect_has_print_method< AttrOrType >::value > * sfinae = nullptr> | |
| void | printStrippedAttrOrType (AttrOrType attrOrType) |
| Print the provided attribute in the context of an operation custom printer/parser: this will invoke directly the print method on the attribute class and skip the #dialect.mnemonic prefix in most cases. | |
| template<typename AttrOrType, std::enable_if_t< detect_has_print_method< AttrOrType >::value > * sfinae = nullptr> | |
| void | printStrippedAttrOrType (ArrayRef< AttrOrType > attrOrTypes) |
| Print the provided array of attributes or types in the context of an operation custom printer/parser: this will invoke directly the print method on the attribute class and skip the #dialect.mnemonic prefix in most cases. | |
| template<typename AttrOrType, std::enable_if_t<!detect_has_print_method< AttrOrType >::value > * sfinae = nullptr> | |
| void | printStrippedAttrOrType (AttrOrType attrOrType) |
| SFINAE for printing the provided attribute in the context of an operation custom printer in the case where the attribute does not define a print method. | |
| virtual void | printAttributeWithoutType (Attribute attr) |
| Print the given attribute without its type. | |
| virtual void | printNamedAttribute (NamedAttribute attr) |
| Print the given named attribute. | |
| virtual LogicalResult | printAlias (Attribute attr) |
| Print the alias for the given attribute, return failure if no alias could be printed. | |
| virtual LogicalResult | printAlias (Type type) |
| Print the alias for the given type, return failure if no alias could be printed. | |
| virtual void | printKeywordOrString (StringRef keyword) |
| Print the given string as a keyword, or a quoted and escaped string if it has any special or non-printable characters in it. | |
| virtual void | printString (StringRef string) |
| Print the given string as a quoted string, escaping any special or non-printable characters in it. | |
| virtual void | printSymbolName (StringRef symbolRef) |
| Print the given string as a symbol reference, i.e. | |
| virtual void | printResourceHandle (const AsmDialectResourceHandle &resource) |
| Print a handle to the given dialect resource. | |
| template<typename TypeRange> | |
| void | printOptionalArrowTypeList (TypeRange &&types) |
| Print an optional arrow followed by a type list. | |
| template<typename TypeRange> | |
| void | printArrowTypeList (TypeRange &&types) |
| template<typename InputRangeT, typename ResultRangeT> | |
| void | printFunctionalType (InputRangeT &&inputs, ResultRangeT &&results) |
| Print the two given type ranges in a functional form. | |
| void | printDimensionList (ArrayRef< int64_t > shape) |
| template<class AttrOrTypeT> | |
| FailureOr< CyclicPrintReset > | tryStartCyclicPrint (AttrOrTypeT attrOrType) |
| Attempts to start a cyclic printing region for attrOrType. | |
Additional Inherited Members | |
| Public Types inherited from mlir::AsmPrinter | |
| template<typename AttrOrType> | |
| using | has_print_method |
| Trait to check if AttrType provides a print method. | |
| template<typename AttrOrType> | |
| using | detect_has_print_method |
| Protected Member Functions inherited from mlir::AsmPrinter | |
| AsmPrinter ()=default | |
| Initialize the printer with no internal implementation. | |
| virtual LogicalResult | pushCyclicPrinting (const void *opaquePointer) |
| Pushes a new attribute or type in the form of a type erased pointer into an internal set. | |
| virtual void | popCyclicPrinting () |
| Removes the element that was last inserted with a successful call to pushCyclicPrinting. | |
This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom printAttribute/printType() method on a dialect.
Definition at line 44 of file DialectImplementation.h.
|
overridedefault |
|
default |
Initialize the printer with no internal implementation.
In this case, all virtual methods of this class must be overriden.
|
inline |
Initialize the printer with the given internal implementation.
Definition at line 127 of file OpImplementation.h.