//===- SPIRVOpDefinition.cpp - MLIR SPIR-V Op Definition Implementation ---===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // Defines the TableGen'erated SPIR-V op implementation in the SPIR-V dialect. // These are placed in a separate file to reduce the total amount of code in // SPIRVOps.cpp and make that file faster to recompile. // //===----------------------------------------------------------------------===// #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h" #include "SPIRVParsingUtils.h" #include "mlir/IR/TypeUtilities.h" namespace mlir::spirv { /// Returns true if the given op is a function-like op or nested in a /// function-like op without a module-like op in the middle. static bool isNestedInFunctionOpInterface(Operation *op) { … } /// Returns true if the given op is an module-like op that maintains a symbol /// table. static bool isDirectInModuleLikeOp(Operation *op) { … } /// Result of a logical op must be a scalar or vector of boolean type. static Type getUnaryOpResultType(Type operandType) { … } static ParseResult parseImageOperands(OpAsmParser &parser, spirv::ImageOperandsAttr &attr) { … } static void printImageOperands(OpAsmPrinter &printer, Operation *imageOp, spirv::ImageOperandsAttr attr) { … } } // namespace mlir::spirv // TablenGen'erated operation definitions. #define GET_OP_CLASSES #include "mlir/Dialect/SPIRV/IR/SPIRVOps.cpp.inc"