MLIR  20.0.0git
Passes.h
Go to the documentation of this file.
1 //===- Passes.h - Pass Entrypoints ------------------------------*- 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_DIALECT_MATH_TRANSFORMS_PASSES_H_
10 #define MLIR_DIALECT_MATH_TRANSFORMS_PASSES_H_
11 
12 #include "mlir/Pass/Pass.h"
13 
14 namespace mlir {
15 namespace math {
16 #define GEN_PASS_DECL
17 #define GEN_PASS_REGISTRATION
18 #include "mlir/Dialect/Math/Transforms/Passes.h.inc"
19 } // namespace math
20 
21 class ConversionTarget;
22 class RewritePatternSet;
23 class TypeConverter;
24 
25 void populateExpandCtlzPattern(RewritePatternSet &patterns);
26 void populateExpandTanPattern(RewritePatternSet &patterns);
27 void populateExpandSinhPattern(RewritePatternSet &patterns);
28 void populateExpandCoshPattern(RewritePatternSet &patterns);
29 void populateExpandTanhPattern(RewritePatternSet &patterns);
30 void populateExpandAsinhPattern(RewritePatternSet &patterns);
31 void populateExpandAcoshPattern(RewritePatternSet &patterns);
32 void populateExpandAtanhPattern(RewritePatternSet &patterns);
33 void populateExpandFmaFPattern(RewritePatternSet &patterns);
34 void populateExpandFloorFPattern(RewritePatternSet &patterns);
35 void populateExpandCeilFPattern(RewritePatternSet &patterns);
36 void populateExpandExp2FPattern(RewritePatternSet &patterns);
37 void populateExpandPowFPattern(RewritePatternSet &patterns);
38 void populateExpandFPowIPattern(RewritePatternSet &patterns);
39 void populateExpandRoundFPattern(RewritePatternSet &patterns);
40 void populateExpandRoundEvenPattern(RewritePatternSet &patterns);
41 void populateExpandRsqrtPattern(RewritePatternSet &patterns);
42 void populateMathAlgebraicSimplificationPatterns(RewritePatternSet &patterns);
43 
45  // Enables the use of AVX2 intrinsics in some of the approximations.
46  bool enableAvx2 = false;
47 };
48 
51 
53  RewritePatternSet &patterns,
55 
56 void populateUpliftToFMAPatterns(RewritePatternSet &patterns);
57 
58 namespace math {
60  TypeConverter &typeConverter, const SetVector<Type> &sourceTypes,
61  Type targetType);
63  ConversionTarget &target, TypeConverter &typeConverter);
64 void populateExtendToSupportedTypesPatterns(RewritePatternSet &patterns,
65  const TypeConverter &typeConverter);
66 } // namespace math
67 } // namespace mlir
68 
69 #endif // MLIR_DIALECT_MATH_TRANSFORMS_PASSES_H_
static llvm::ManagedStatic< PassManagerOptions > options
void populateExtendToSupportedTypesPatterns(RewritePatternSet &patterns, const TypeConverter &typeConverter)
void populateExtendToSupportedTypesConversionTarget(ConversionTarget &target, TypeConverter &typeConverter)
void populateExtendToSupportedTypesTypeConverter(TypeConverter &typeConverter, const SetVector< Type > &sourceTypes, Type targetType)
Include the generated interface declarations.
void populateExpandSinhPattern(RewritePatternSet &patterns)
void populateExpandRsqrtPattern(RewritePatternSet &patterns)
void populateExpandTanhPattern(RewritePatternSet &patterns)
void populatePolynomialApproximateErfPattern(RewritePatternSet &patterns)
void populatePolynomialApproximateTanhPattern(RewritePatternSet &patterns)
void populateExpandFmaFPattern(RewritePatternSet &patterns)
void populateExpandAcoshPattern(RewritePatternSet &patterns)
void populateExpandFPowIPattern(RewritePatternSet &patterns)
void populateUpliftToFMAPatterns(RewritePatternSet &patterns)
Definition: UpliftToFMA.cpp:77
void populateMathAlgebraicSimplificationPatterns(RewritePatternSet &patterns)
void populateExpandPowFPattern(RewritePatternSet &patterns)
void populateExpandTanPattern(RewritePatternSet &patterns)
void populateExpandCoshPattern(RewritePatternSet &patterns)
void populateExpandRoundFPattern(RewritePatternSet &patterns)
void populateExpandExp2FPattern(RewritePatternSet &patterns)
void populateExpandCeilFPattern(RewritePatternSet &patterns)
void populateExpandCtlzPattern(RewritePatternSet &patterns)
void populateExpandAsinhPattern(RewritePatternSet &patterns)
void populateMathPolynomialApproximationPatterns(RewritePatternSet &patterns, const MathPolynomialApproximationOptions &options={})
void populateExpandRoundEvenPattern(RewritePatternSet &patterns)
void populateExpandAtanhPattern(RewritePatternSet &patterns)
void populateExpandFloorFPattern(RewritePatternSet &patterns)