//===- Operation.h - MLIR PDLL ODS Operation --------------------*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// #ifndef MLIR_TOOLS_PDLL_ODS_OPERATION_H_ #define MLIR_TOOLS_PDLL_ODS_OPERATION_H_ #include <string> #include "mlir/Support/LLVM.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/SMLoc.h" namespace mlir { namespace pdll { namespace ods { class AttributeConstraint; class TypeConstraint; class Dialect; //===----------------------------------------------------------------------===// // VariableLengthKind //===----------------------------------------------------------------------===// enum VariableLengthKind { … }; //===----------------------------------------------------------------------===// // Attribute //===----------------------------------------------------------------------===// /// This class provides an ODS representation of a specific operation attribute. /// This includes the name, optionality, and more. class Attribute { … }; //===----------------------------------------------------------------------===// // OperandOrResult //===----------------------------------------------------------------------===// /// This class provides an ODS representation of a specific operation operand or /// result. This includes the name, variable length flags, and more. class OperandOrResult { … }; //===----------------------------------------------------------------------===// // Operation //===----------------------------------------------------------------------===// /// This class provides an ODS representation of a specific operation. This /// includes all of the information necessary for use by the PDL frontend for /// generating code for a pattern rewrite. class Operation { … }; } // namespace ods } // namespace pdll } // namespace mlir #endif // MLIR_TOOLS_PDLL_ODS_OPERATION_H_