1 //===- TestDialect.h - MLIR Dialect for testing -----------------*- 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 a fake 'test' dialect that can be used for testing things
10 // that do not have a respective counterpart in the main source directories.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MLIR_TESTDIALECT_H
15 #define MLIR_TESTDIALECT_H
16 
17 #include "TestAttributes.h"
18 #include "TestInterfaces.h"
19 #include "mlir/Dialect/DLTI/DLTI.h"
20 #include "mlir/Dialect/DLTI/Traits.h"
21 #include "mlir/Dialect/Linalg/IR/Linalg.h"
22 #include "mlir/Dialect/Traits.h"
23 #include "mlir/IR/BuiltinOps.h"
24 #include "mlir/IR/BuiltinTypes.h"
25 #include "mlir/IR/Dialect.h"
26 #include "mlir/IR/OpDefinition.h"
27 #include "mlir/IR/OpImplementation.h"
28 #include "mlir/IR/RegionKindInterface.h"
29 #include "mlir/IR/SymbolTable.h"
30 #include "mlir/Interfaces/CallInterfaces.h"
31 #include "mlir/Interfaces/ControlFlowInterfaces.h"
32 #include "mlir/Interfaces/CopyOpInterface.h"
33 #include "mlir/Interfaces/DerivedAttributeOpInterface.h"
34 #include "mlir/Interfaces/InferTypeOpInterface.h"
35 #include "mlir/Interfaces/SideEffectInterfaces.h"
36 
37 namespace mlir {
38 class DLTIDialect;
39 class RewritePatternSet;
40 } // namespace mlir
41 
42 #include "TestOpInterfaces.h.inc"
43 #include "TestOpStructs.h.inc"
44 #include "TestOpsDialect.h.inc"
45 
46 #define GET_OP_CLASSES
47 #include "TestOps.h.inc"
48 
49 namespace test {
50 void registerTestDialect(::mlir::DialectRegistry &registry);
51 void populateTestReductionPatterns(::mlir::RewritePatternSet &patterns);
52 } // namespace test
53 
54 #endif // MLIR_TESTDIALECT_H
55