[Mlir-commits] [mlir] [mlir] Enable decoupling two kinds of greedy behavior. (PR #104649)
Mehdi Amini
llvmlistbot at llvm.org
Fri Dec 13 16:07:16 PST 2024
================
@@ -117,10 +126,18 @@ class GreedyRewriteConfig {
///
/// Note: This method does not apply patterns to the region's parent operation.
LogicalResult
+applyPatternsGreedily(Region ®ion, const FrozenRewritePatternSet &patterns,
+ GreedyRewriteConfig config = GreedyRewriteConfig(),
+ bool *changed = nullptr);
+/// Same as `applyPatternsAndGreedily` above with folding.
+inline LogicalResult
applyPatternsAndFoldGreedily(Region ®ion,
const FrozenRewritePatternSet &patterns,
GreedyRewriteConfig config = GreedyRewriteConfig(),
- bool *changed = nullptr);
+ bool *changed = nullptr) {
+ config.fold = true;
+ return applyPatternsGreedily(region, patterns, config, changed);
+}
----------------
joker-eph wrote:
I think we need to: otherwise we'll get warnings in tree.
https://github.com/llvm/llvm-project/pull/104649
More information about the Mlir-commits
mailing list