Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions mlir/include/mlir/Conversion/ArithToSMT/ArithToSMT.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//===- ArithToSMT.h - Arith to SMT dialect conversion ---------*- 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_CONVERSION_ARITHTOSMT_H
#define MLIR_CONVERSION_ARITHTOSMT_H

#include "mlir/Pass/Pass.h"
#include <memory>

namespace mlir {

class TypeConverter;
class RewritePatternSet;

#define GEN_PASS_DECL_CONVERTARITHTOSMT
#include "mlir/Conversion/Passes.h.inc"

namespace arith {
/// Get the Arith to SMT conversion patterns.
void populateArithToSMTConversionPatterns(TypeConverter &converter,
RewritePatternSet &patterns);
} // namespace arith
} // namespace mlir

#endif // MLIR_CONVERSION_ARITHTOSMT_H
1 change: 1 addition & 0 deletions mlir/include/mlir/Conversion/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "mlir/Conversion/ArithToArmSME/ArithToArmSME.h"
#include "mlir/Conversion/ArithToEmitC/ArithToEmitCPass.h"
#include "mlir/Conversion/ArithToLLVM/ArithToLLVM.h"
#include "mlir/Conversion/ArithToSMT/ArithToSMT.h"
#include "mlir/Conversion/ArithToSPIRV/ArithToSPIRV.h"
#include "mlir/Conversion/ArmNeon2dToIntr/ArmNeon2dToIntr.h"
#include "mlir/Conversion/ArmSMEToLLVM/ArmSMEToLLVM.h"
Expand Down
13 changes: 13 additions & 0 deletions mlir/include/mlir/Conversion/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -1493,4 +1493,17 @@ def ConvertVectorToXeGPU : Pass<"convert-vector-to-xegpu"> {
];
}

//===----------------------------------------------------------------------===//
// ConvertArithToSMT
//===----------------------------------------------------------------------===//

def ConvertArithToSMT : Pass<"convert-arith-to-smt"> {
let summary = "Convert arith ops and constants to SMT ops";
let dependentDialects = [
"smt::SMTDialect",
"arith::ArithDialect",
"mlir::func::FuncDialect"
];
}

#endif // MLIR_CONVERSION_PASSES
1 change: 1 addition & 0 deletions mlir/include/mlir/InitAllPasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ inline void registerAllPasses() {
arm_sve::registerArmSVEPasses();
emitc::registerEmitCPasses();
xegpu::registerXeGPUPasses();
registerConvertArithToSMTPass();

// Dialect pipelines
bufferization::registerBufferizationPipelines();
Expand Down
Loading
Loading