File tree Expand file tree Collapse file tree 8 files changed +498
-0
lines changed
test/Conversion/ArithToSMT Expand file tree Collapse file tree 8 files changed +498
-0
lines changed Original file line number Diff line number Diff line change
1
+ // ===- ArithToSMT.h - Arith to SMT dialect conversion ---------*- 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_CONVERSION_ARITHTOSMT_H
10
+ #define MLIR_CONVERSION_ARITHTOSMT_H
11
+
12
+ #include " mlir/Pass/Pass.h"
13
+ #include < memory>
14
+
15
+ namespace mlir {
16
+
17
+ class TypeConverter ;
18
+ class RewritePatternSet ;
19
+
20
+ #define GEN_PASS_DECL_CONVERTARITHTOSMT
21
+ #include " mlir/Conversion/Passes.h.inc"
22
+
23
+ namespace arith {
24
+ // / Get the Arith to SMT conversion patterns.
25
+ void populateArithToSMTConversionPatterns (TypeConverter &converter,
26
+ RewritePatternSet &patterns);
27
+ } // namespace arith
28
+ } // namespace mlir
29
+
30
+ #endif // MLIR_CONVERSION_ARITHTOSMT_H
Original file line number Diff line number Diff line change 15
15
#include " mlir/Conversion/ArithToArmSME/ArithToArmSME.h"
16
16
#include " mlir/Conversion/ArithToEmitC/ArithToEmitCPass.h"
17
17
#include " mlir/Conversion/ArithToLLVM/ArithToLLVM.h"
18
+ #include " mlir/Conversion/ArithToSMT/ArithToSMT.h"
18
19
#include " mlir/Conversion/ArithToSPIRV/ArithToSPIRV.h"
19
20
#include " mlir/Conversion/ArmNeon2dToIntr/ArmNeon2dToIntr.h"
20
21
#include " mlir/Conversion/ArmSMEToLLVM/ArmSMEToLLVM.h"
Original file line number Diff line number Diff line change @@ -1493,4 +1493,17 @@ def ConvertVectorToXeGPU : Pass<"convert-vector-to-xegpu"> {
1493
1493
];
1494
1494
}
1495
1495
1496
+ //===----------------------------------------------------------------------===//
1497
+ // ConvertArithToSMT
1498
+ //===----------------------------------------------------------------------===//
1499
+
1500
+ def ConvertArithToSMT : Pass<"convert-arith-to-smt"> {
1501
+ let summary = "Convert arith ops and constants to SMT ops";
1502
+ let dependentDialects = [
1503
+ "smt::SMTDialect",
1504
+ "arith::ArithDialect",
1505
+ "mlir::func::FuncDialect"
1506
+ ];
1507
+ }
1508
+
1496
1509
#endif // MLIR_CONVERSION_PASSES
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ inline void registerAllPasses() {
95
95
arm_sve::registerArmSVEPasses ();
96
96
emitc::registerEmitCPasses ();
97
97
xegpu::registerXeGPUPasses ();
98
+ registerConvertArithToSMTPass ();
98
99
99
100
// Dialect pipelines
100
101
bufferization::registerBufferizationPipelines ();
You can’t perform that action at this time.
0 commit comments