MLIR  20.0.0git
LinalgMatchOps.h
Go to the documentation of this file.
1 //===- LinalgMatchOps.h - Linalg transform matcher ops ----------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef MLIR_DIALECT_LINALG_TRANSFORMOPS_LINALGMATCHOPS_H
10 #define MLIR_DIALECT_LINALG_TRANSFORMOPS_LINALGMATCHOPS_H
11 
15 
16 namespace mlir {
17 namespace transform {
18 
19 namespace detail {
21  Value structuredOpHandle);
22 } // namespace detail
23 
24 template <typename OpTy>
26  : public OpTrait::TraitBase<OpTy, StructuredOpPredicateOpTrait> {
27 public:
28  static LogicalResult verifyTrait(Operation *op) {
29  static_assert(
30  OpTy::template hasTrait<SingleOpMatcherOpTrait>(),
31  "StructuredOpPredicateOpTrait requires SingleOpMatcherOpTrait");
32 
34  op, cast<OpTy>(op).getOperandHandle());
35  }
36 };
37 
38 } // namespace transform
39 } // namespace mlir
40 
41 //===----------------------------------------------------------------------===//
42 // Linalg Matcher Operations
43 //===----------------------------------------------------------------------===//
44 
45 #define GET_OP_CLASSES
46 #include "mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.h.inc"
47 
48 #endif // MLIR_DIALECT_LINALG_TRANSFORMOPS_LINALGMATCHOPS_H
Helper class for implementing traits.
Definition: OpDefinition.h:373
Operation is the basic unit of execution within MLIR.
Definition: Operation.h:88
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition: Value.h:96
static LogicalResult verifyTrait(Operation *op)
LogicalResult verifyStructuredOpPredicateOpTrait(Operation *op, Value structuredOpHandle)
Include the generated interface declarations.