MLIR  20.0.0git
Macros | Functions
MLProgramOps.cpp File Reference
#include "mlir/Dialect/MLProgram/IR/MLProgram.h"
#include "mlir/IR/Builders.h"
#include "mlir/Interfaces/FunctionImplementation.h"
#include "mlir/Dialect/MLProgram/IR/MLProgramOps.cpp.inc"

Go to the source code of this file.

Macros

#define GET_OP_CLASSES
 

Functions

static ParseResult parseTokenOrdering (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &consumeTokens, Type &produceTokenType)
 Parse and print an ordering clause for a variadic of consuming tokens and an producing token. More...
 
static void printTokenOrdering (OpAsmPrinter &p, Operation *op, OperandRange consumeTokens, Type produceTokenType)
 
static ParseResult parseTypedInitialValue (OpAsmParser &parser, TypeAttr &typeAttr, Attribute &attr)
 some.op custom<TypeOrAttr>($type, $attr) More...
 
static void printTypedInitialValue (OpAsmPrinter &p, Operation *op, TypeAttr type, Attribute attr)
 
static ParseResult parseSymbolVisibility (OpAsmParser &parser, StringAttr &symVisibilityAttr)
 some.op custom<SymbolVisibility>($sym_visibility) $sym_name -> some.op public @foo some.op private @foo More...
 
static void printSymbolVisibility (OpAsmPrinter &p, Operation *op, StringAttr symVisibilityAttr)
 

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 141 of file MLProgramOps.cpp.

Function Documentation

◆ parseSymbolVisibility()

static ParseResult parseSymbolVisibility ( OpAsmParser parser,
StringAttr &  symVisibilityAttr 
)
static

some.op custom<SymbolVisibility>($sym_visibility) $sym_name -> some.op public @foo some.op private @foo

Definition at line 116 of file MLProgramOps.cpp.

References mlir::AsmParser::parseOptionalKeyword().

◆ parseTokenOrdering()

static ParseResult parseTokenOrdering ( OpAsmParser parser,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > &  consumeTokens,
Type produceTokenType 
)
static

Parse and print an ordering clause for a variadic of consuming tokens and an producing token.

Syntax: ordering(%0, %1 -> !ml_program.token) ordering(() -> !ml_program.token)

If both the consuming and producing token are not present on the op, then the clause prints nothing.

Definition at line 29 of file MLProgramOps.cpp.

References mlir::AsmParser::parseArrow(), mlir::AsmParser::parseLParen(), mlir::OpAsmParser::parseOperandList(), mlir::AsmParser::parseOptionalKeyword(), mlir::AsmParser::parseOptionalLParen(), mlir::AsmParser::parseRParen(), and mlir::AsmParser::parseType().

◆ parseTypedInitialValue()

static ParseResult parseTypedInitialValue ( OpAsmParser parser,
TypeAttr &  typeAttr,
Attribute attr 
)
static

some.op custom<TypeOrAttr>($type, $attr)

Uninitialized: some.op : tensor<3xi32> Initialized to narrower type than op: some.op (dense<0> : tensor<3xi32>) : tensor<?xi32>

Definition at line 84 of file MLProgramOps.cpp.

References mlir::get(), mlir::AsmParser::parseAttribute(), mlir::AsmParser::parseColonType(), mlir::AsmParser::parseOptionalLParen(), and mlir::AsmParser::parseRParen().

◆ printSymbolVisibility()

static void printSymbolVisibility ( OpAsmPrinter p,
Operation op,
StringAttr  symVisibilityAttr 
)
static

Definition at line 129 of file MLProgramOps.cpp.

◆ printTokenOrdering()

static void printTokenOrdering ( OpAsmPrinter p,
Operation op,
OperandRange  consumeTokens,
Type  produceTokenType 
)
static

◆ printTypedInitialValue()

static void printTypedInitialValue ( OpAsmPrinter p,
Operation op,
TypeAttr  type,
Attribute  attr 
)
static

Definition at line 100 of file MLProgramOps.cpp.

References mlir::AsmPrinter::printAttribute().