9#ifndef MLIR_LIB_DIALECT_SPIRV_IR_SPIRVOPDEFINITION_H
10#define MLIR_LIB_DIALECT_SPIRV_IR_SPIRVOPDEFINITION_H
22 spirv::ImageOperandsAttr &attr);
24 spirv::ImageOperandsAttr attr);
27 OpAsmParser &parser, Type &selectorType,
Block *&defaultTarget,
28 SmallVectorImpl<OpAsmParser::UnresolvedOperand> &defaultOperands,
29 SmallVectorImpl<Type> &defaultOperandTypes, DenseIntElementsAttr &literals,
30 SmallVectorImpl<Block *> &targets,
31 SmallVectorImpl<SmallVector<OpAsmParser::UnresolvedOperand>>
33 SmallVectorImpl<SmallVector<Type>> &targetOperandTypes);
35 Block *defaultTarget, OperandRange defaultOperands,
37 DenseIntElementsAttr literals, SuccessorRange targets,
38 OperandRangeRange targetOperands,
39 const TypeRangeRange &targetOperandTypes);
void printSwitchOpCases(OpAsmPrinter &p, SwitchOp op, Type selectorType, Block *defaultTarget, OperandRange defaultOperands, TypeRange defaultOperandTypes, DenseIntElementsAttr literals, SuccessorRange targets, OperandRangeRange targetOperands, const TypeRangeRange &targetOperandTypes)
void printImageOperands(OpAsmPrinter &printer, Operation *imageOp, spirv::ImageOperandsAttr attr)
bool isDirectInModuleLikeOp(Operation *op)
Returns true if the given op is an module-like op that maintains a symbol table.
bool isNestedInGraphARMOpInterface(Operation *op)
Returns true if the given op is a GraphARM op or nested in a GraphARM op without a module-like op in ...
Type getMatchingBoolType(Type operandType)
Returns a boolean scalar or vector type matching the shape of the given type.
ParseResult parseImageOperands(OpAsmParser &parser, spirv::ImageOperandsAttr &attr)
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...
ParseResult parseSwitchOpCases(OpAsmParser &parser, Type &selectorType, Block *&defaultTarget, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &defaultOperands, SmallVectorImpl< Type > &defaultOperandTypes, DenseIntElementsAttr &literals, SmallVectorImpl< Block * > &targets, SmallVectorImpl< SmallVector< OpAsmParser::UnresolvedOperand > > &targetOperands, SmallVectorImpl< SmallVector< Type > > &targetOperandTypes)
Adapted from the cf.switch implementation.