29 if (isa<FunctionOpInterface>(op))
44 if (
auto vecType = llvm::dyn_cast<VectorType>(operandType))
50 spirv::ImageOperandsAttr &attr) {
55 spirv::ImageOperands imageOperands;
65 spirv::ImageOperandsAttr attr) {
67 auto strImageOperands = stringifyImageOperands(attr.getValue());
68 printer <<
"[\"" << strImageOperands <<
"\"]";
75 #define GET_OP_CLASSES
76 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.cpp.inc"
MLIRContext * getContext() const
virtual ParseResult parseRSquare()=0
Parse a ] token.
virtual ParseResult parseOptionalLSquare()=0
Parse a [ token if present.
This class is a general helper class for creating context-global objects like types,...
IntegerType getIntegerType(unsigned width)
The OpAsmParser has methods for interacting with the asm parser: parsing things from it,...
This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom p...
A trait used to provide symbol table functionalities to a region operation.
Operation is the basic unit of execution within MLIR.
bool hasTrait()
Returns true if the operation was registered with a particular trait, e.g.
Operation * getParentOp()
Returns the closest surrounding operation that contains this operation or nullptr if this is a top-le...
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
MLIRContext * getContext() const
Return the MLIRContext in which this type was uniqued.
ParseResult parseEnumStrAttr(EnumClass &value, OpAsmParser &parser, StringRef attrName=spirv::attributeName< EnumClass >())
Parses the next string attribute in parser as an enumerant of the given EnumClass.
static bool isDirectInModuleLikeOp(Operation *op)
Returns true if the given op is an module-like op that maintains a symbol table.
static Type getUnaryOpResultType(Type operandType)
Result of a logical op must be a scalar or vector of boolean type.
static void printImageOperands(OpAsmPrinter &printer, Operation *imageOp, spirv::ImageOperandsAttr attr)
static bool isNestedInFunctionOpInterface(Operation *op)
Returns true if the given op is a function-like op or nested in a function-like op without a module-l...
static ParseResult parseImageOperands(OpAsmParser &parser, spirv::ImageOperandsAttr &attr)
auto get(MLIRContext *context, Ts &&...params)
Helper method that injects context only if needed, this helps unify some of the attribute constructio...