xref: /llvm-project/mlir/include/mlir/Conversion/TosaToArith/TosaToArith.h (revision b9cfb6f7e082b57d8a1c5fc577dd357da60238db)
1 //===-- TosaToArith.h - TOSA optimization pass declarations --*- 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 declares the passes for the TOSA to Standard Dialect conversion.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_CONVERSION_TOSATOARITH_TOSATOARITH_H
14 #define MLIR_CONVERSION_TOSATOARITH_TOSATOARITH_H
15 
16 #include "mlir/Pass/Pass.h"
17 
18 namespace mlir {
19 
20 #define GEN_PASS_DECL_TOSATOARITH
21 #include "mlir/Conversion/Passes.h.inc"
22 
23 namespace tosa {
24 
25 std::unique_ptr<Pass> createTosaToArith(bool includeApplyRescale = false,
26                                         bool use32BitApplyRescale = false);
27 
28 void populateTosaToArithConversionPatterns(RewritePatternSet *patterns);
29 
30 void populateTosaRescaleToArithConversionPatterns(RewritePatternSet *patterns,
31                                                   bool include32Bit = false);
32 
33 } // namespace tosa
34 } // namespace mlir
35 
36 #endif // MLIR_CONVERSION_TOSATOARITH_TOSATOARITH_H
37