[Mlir-commits] [mlir] [MLIR][Math] Add fine-grained populate-patterns functions for math function rewrites. (PR #126103)

Jakub Kuderski llvmlistbot at llvm.org
Fri Feb 7 13:35:30 PST 2025


================
@@ -48,6 +48,27 @@ struct MathPolynomialApproximationOptions {
 void populatePolynomialApproximateTanhPattern(RewritePatternSet &patterns);
 void populatePolynomialApproximateErfPattern(RewritePatternSet &patterns);
 
+// Adds patterns to convert to f32 around math functions for which `predicate`
+// returns true.
+void populateMathF32ExpansionPatterns(
+    RewritePatternSet &patterns,
+    const std::function<bool(StringRef)> &predicate);
----------------
kuhar wrote:

This is a populate function -- the predicate won't be stored anywhere (unlike in a pass creation function)

https://github.com/llvm/llvm-project/pull/126103


More information about the Mlir-commits mailing list