My Project
Public Member Functions | List of all members
mlir::OpAsmPrinter Class Referenceabstract

#include <OpImplementation.h>

Public Member Functions

 OpAsmPrinter ()
 
virtual ~OpAsmPrinter ()
 
virtual raw_ostream & getStream () const =0
 
virtual void printOperand (Value value)=0
 Print implementations for various things an operation contains. More...
 
template<typename ContainerType >
void printOperands (const ContainerType &container)
 Print a comma separated list of operands. More...
 
template<typename IteratorType >
void printOperands (IteratorType it, IteratorType end)
 Print a comma separated list of operands. More...
 
virtual void printType (Type type)=0
 
virtual void printAttribute (Attribute attr)=0
 
virtual void printSuccessorAndUseList (Operation *term, unsigned index)=0
 
virtual void printOptionalAttrDict (ArrayRef< NamedAttribute > attrs, ArrayRef< StringRef > elidedAttrs={})=0
 
virtual void printOptionalAttrDictWithKeyword (ArrayRef< NamedAttribute > attrs, ArrayRef< StringRef > elidedAttrs={})=0
 
virtual void printGenericOp (Operation *op)=0
 Print the entire operation with the default generic assembly form. More...
 
virtual void printRegion (Region &blocks, bool printEntryBlockArgs=true, bool printBlockTerminators=true)=0
 Prints a region. More...
 
virtual void shadowRegionArgs (Region &region, ValueRange namesToUse)=0
 
virtual void printAffineMapOfSSAIds (AffineMapAttr mapAttr, ValueRange operands)=0
 
void printOptionalArrowTypeList (ArrayRef< Type > types)
 Print an optional arrow followed by a type list. More...
 
void printFunctionalType (Operation *op)
 Print the complete type of an operation in functional form. More...
 
virtual void printSymbolName (StringRef symbolRef)=0
 

Detailed Description

This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom print() method.

Constructor & Destructor Documentation

◆ OpAsmPrinter()

mlir::OpAsmPrinter::OpAsmPrinter ( )
inline

◆ ~OpAsmPrinter()

OpAsmPrinter::~OpAsmPrinter ( )
virtual

Member Function Documentation

◆ getStream()

virtual raw_ostream& mlir::OpAsmPrinter::getStream ( ) const
pure virtual

◆ printAffineMapOfSSAIds()

virtual void mlir::OpAsmPrinter::printAffineMapOfSSAIds ( AffineMapAttr  mapAttr,
ValueRange  operands 
)
pure virtual

Prints an affine map of SSA ids, where SSA id names are used in place of dims/symbols. Operand values must come from single-result sources, and be valid dimensions/symbol identifiers according to mlir::isValidDim/Symbol.

◆ printAttribute()

virtual void mlir::OpAsmPrinter::printAttribute ( Attribute  attr)
pure virtual

◆ printFunctionalType()

void mlir::OpAsmPrinter::printFunctionalType ( Operation op)
inline

Print the complete type of an operation in functional form.

◆ printGenericOp()

virtual void mlir::OpAsmPrinter::printGenericOp ( Operation op)
pure virtual

Print the entire operation with the default generic assembly form.

◆ printOperand()

virtual void mlir::OpAsmPrinter::printOperand ( Value  value)
pure virtual

Print implementations for various things an operation contains.

◆ printOperands() [1/2]

template<typename ContainerType >
void mlir::OpAsmPrinter::printOperands ( const ContainerType &  container)
inline

Print a comma separated list of operands.

◆ printOperands() [2/2]

template<typename IteratorType >
void mlir::OpAsmPrinter::printOperands ( IteratorType  it,
IteratorType  end 
)
inline

Print a comma separated list of operands.

◆ printOptionalArrowTypeList()

void mlir::OpAsmPrinter::printOptionalArrowTypeList ( ArrayRef< Type types)
inline

Print an optional arrow followed by a type list.

◆ printOptionalAttrDict()

virtual void mlir::OpAsmPrinter::printOptionalAttrDict ( ArrayRef< NamedAttribute attrs,
ArrayRef< StringRef >  elidedAttrs = {} 
)
pure virtual

If the specified operation has attributes, print out an attribute dictionary with their values. elidedAttrs allows the client to ignore specific well known attributes, commonly used if the attribute value is printed some other way (like as a fixed operand).

◆ printOptionalAttrDictWithKeyword()

virtual void mlir::OpAsmPrinter::printOptionalAttrDictWithKeyword ( ArrayRef< NamedAttribute attrs,
ArrayRef< StringRef >  elidedAttrs = {} 
)
pure virtual

If the specified operation has attributes, print out an attribute dictionary prefixed with 'attributes'.

◆ printRegion()

virtual void mlir::OpAsmPrinter::printRegion ( Region blocks,
bool  printEntryBlockArgs = true,
bool  printBlockTerminators = true 
)
pure virtual

Prints a region.

◆ printSuccessorAndUseList()

virtual void mlir::OpAsmPrinter::printSuccessorAndUseList ( Operation term,
unsigned  index 
)
pure virtual

Print a successor, and use list, of a terminator operation given the terminator and the successor index.

◆ printSymbolName()

virtual void mlir::OpAsmPrinter::printSymbolName ( StringRef  symbolRef)
pure virtual

Print the given string as a symbol reference, i.e. a form representable by a SymbolRefAttr. A symbol reference is represented as a string prefixed with '@'. The reference is surrounded with ""'s and escaped if it has any special or non-printable characters in it.

◆ printType()

virtual void mlir::OpAsmPrinter::printType ( Type  type)
pure virtual

◆ shadowRegionArgs()

virtual void mlir::OpAsmPrinter::shadowRegionArgs ( Region region,
ValueRange  namesToUse 
)
pure virtual

Renumber the arguments for the specified region to the same names as the SSA values in namesToUse. This may only be used for IsolatedFromAbove operations. If any entry in namesToUse is null, the corresponding argument name is left alone.


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