1 //===- PDL.h - Pattern Descriptor Language Types ----------------*- 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 // This file defines the types for the Pattern Descriptor Language dialect. 10 // 11 //===----------------------------------------------------------------------===// 12 13 #ifndef MLIR_DIALECT_PDL_IR_PDLTYPES_H_ 14 #define MLIR_DIALECT_PDL_IR_PDLTYPES_H_ 15 16 #include "mlir/IR/Types.h" 17 18 namespace mlir { 19 namespace pdl { 20 //===----------------------------------------------------------------------===// 21 // PDL Dialect Types 22 //===----------------------------------------------------------------------===// 23 24 /// This type represents a handle to an `mlir::Attribute`. 25 struct AttributeType : public Type::TypeBase<AttributeType, Type, TypeStorage> { 26 using Base::Base; 27 }; 28 29 /// This type represents a handle to an `mlir::Operation*`. 30 struct OperationType : public Type::TypeBase<OperationType, Type, TypeStorage> { 31 using Base::Base; 32 }; 33 34 /// This type represents a handle to an `mlir::Type`. 35 struct TypeType : public Type::TypeBase<TypeType, Type, TypeStorage> { 36 using Base::Base; 37 }; 38 39 /// This type represents a handle to an `mlir::Value`. 40 struct ValueType : public Type::TypeBase<ValueType, Type, TypeStorage> { 41 using Base::Base; 42 }; 43 44 } // end namespace pdl 45 } // end namespace mlir 46 47 #endif // MLIR_DIALECT_PDL_IR_PDLTYPES_H_ 48