1 //===- ComplexToLibm.h - Utils to convert from the complex dialect --------===//
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 #ifndef MLIR_CONVERSION_COMPLEXTOLIBM_COMPLEXTOLIBM_H_
9 #define MLIR_CONVERSION_COMPLEXTOLIBM_COMPLEXTOLIBM_H_
10 
11 #include "mlir/Transforms/DialectConversion.h"
12 
13 namespace mlir {
14 template <typename T>
15 class OperationPass;
16 
17 /// Populate the given list with patterns that convert from Complex to Libm
18 /// calls.
19 void populateComplexToLibmConversionPatterns(RewritePatternSet &patterns,
20                                              PatternBenefit benefit);
21 
22 /// Create a pass to convert Complex operations to libm calls.
23 std::unique_ptr<OperationPass<ModuleOp>> createConvertComplexToLibmPass();
24 
25 } // namespace mlir
26 
27 #endif // MLIR_CONVERSION_COMPLEXTOLIBM_COMPLEXTOLIBM_H_
28