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/Func/IR/FuncOps.h"
22 #include "mlir/Dialect/Linalg/IR/Linalg.h"
23 #include "mlir/Dialect/Traits.h"
24 #include "mlir/IR/BuiltinOps.h"
25 #include "mlir/IR/BuiltinTypes.h"
26 #include "mlir/IR/Dialect.h"
27 #include "mlir/IR/ExtensibleDialect.h"
28 #include "mlir/IR/OpDefinition.h"
29 #include "mlir/IR/OpImplementation.h"
30 #include "mlir/IR/RegionKindInterface.h"
31 #include "mlir/IR/SymbolTable.h"
32 #include "mlir/Interfaces/CallInterfaces.h"
33 #include "mlir/Interfaces/ControlFlowInterfaces.h"
34 #include "mlir/Interfaces/CopyOpInterface.h"
35 #include "mlir/Interfaces/DerivedAttributeOpInterface.h"
36 #include "mlir/Interfaces/InferTypeOpInterface.h"
37 #include "mlir/Interfaces/LoopLikeInterface.h"
38 #include "mlir/Interfaces/SideEffectInterfaces.h"
39 #include "mlir/Interfaces/ViewLikeInterface.h"
40 
41 namespace mlir {
42 class DLTIDialect;
43 class RewritePatternSet;
44 } // namespace mlir
45 
46 #include "TestOpInterfaces.h.inc"
47 #include "TestOpStructs.h.inc"
48 #include "TestOpsDialect.h.inc"
49 
50 #define GET_OP_CLASSES
51 #include "TestOps.h.inc"
52 
53 namespace test {
54 void registerTestDialect(::mlir::DialectRegistry &registry);
55 void populateTestReductionPatterns(::mlir::RewritePatternSet &patterns);
56 } // namespace test
57 
58 #endif // MLIR_TESTDIALECT_H
59