summaryrefslogtreecommitdiff
path: root/mlir/lib/Reducer/ReductionTreePass.cpp
AgeCommit message (Collapse)Author
2025-11-13[MLIR] Add reduction interface with tester to mlir-reduce (#166096)AidinT
Currently, we don't have support for patterns that need access to a `Tester` instance in `mlir-reduce`. This PR adds `DialectReductionPatternWithTesterInterface` to the set of supported interfaces. Dialects can implement this interface to inject the tester into their pattern classes.
2025-07-15[mlir] Remove unused includes (NFC) (#148872)Kazu Hirata
These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures.
2025-04-24[mlir] add a fluent API to GreedyRewriterConfig (#137122)Oleksandr "Alex" Zinenko
This is similar to other configuration objects used across MLIR. Rename some fields to better reflect that they are no longer booleans. Reland 04d261101b4f229189463136a794e3e362a793af / #132253.
2025-04-18Revert "[mlir] add a fluent API to GreedyRewriterConfig (#132253)"Kazu Hirata
This reverts commit 63b8f1c9482ed0a964980df4aed89bef922b8078. Buildbot failure: https://lab.llvm.org/buildbot/#/builders/172/builds/12083/steps/5/logs/stdio I've reproduced the error with a release build (-DCMAKE_BUILD_TYPE=Release).
2025-04-18[mlir] add a fluent API to GreedyRewriterConfig (#132253)Oleksandr "Alex" Zinenko
This is similar to other configuration objects used across MLIR.
2025-04-08[MLIR][NFC] Retire let constructor for Reducer (#134786)lorenzo chelini
let constructor is legacy (do not use in tree!) since the tableGen backend emits most of the glue logic to build a pass.
2025-02-17[mlir] Update docs for Greedy Pattern Rewrite Driver(NFC) (#126701)Longsheng Mou
The `applyOpPatternsAndFold` is deprecated, use `applyOpPatternsGreedily` instead.
2024-12-20[mlir] Enable decoupling two kinds of greedy behavior. (#104649)Jacques Pienaar
The greedy rewriter is used in many different flows and it has a lot of convenience (work list management, debugging actions, tracing, etc). But it combines two kinds of greedy behavior 1) how ops are matched, 2) folding wherever it can. These are independent forms of greedy and leads to inefficiency. E.g., cases where one need to create different phases in lowering and is required to applying patterns in specific order split across different passes. Using the driver one ends up needlessly retrying folding/having multiple rounds of folding attempts, where one final run would have sufficed. Of course folks can locally avoid this behavior by just building their own, but this is also a common requested feature that folks keep on working around locally in suboptimal ways. For downstream users, there should be no behavioral change. Updating from the deprecated should just be a find and replace (e.g., `find ./ -type f -exec sed -i 's|applyPatternsAndFoldGreedily|applyPatternsGreedily|g' {} \;` variety) as the API arguments hasn't changed between the two.
2023-01-27[mlir] GreedyPatternRewriteDriver: Move strict mode to ↵Matthias Springer
GreedyPatternRewriteDriver `strictMode` is moved to GreedyRewriteConfig to simplify the API and state of rewriter classes. The region-based GreedyPatternRewriteDriver now also supports strict mode. MultiOpPatternRewriteDriver becomes simpler: fewer method must be overridden. Differential Revision: https://reviews.llvm.org/D142623
2022-10-03[mlir-reduce] Support parsing operations other than 'builtin.module' as ↵rkayaith
top-level This adds a `--no-implicit-module` option, which disables the insertion of a top-level `builtin.module` during parsing. Although other ops can now be parsed as top-level, the actual reduction passes are still restricted to `builtin.module` as it didn't seem straightforward to update them. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D134242
2022-08-31[MLIR] Update pass declarations to new autogenerated filesMichele Scuttari
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure. Reviewed By: mehdi_amini, rriddle Differential Review: https://reviews.llvm.org/D132838
2022-08-30Revert "[MLIR] Update pass declarations to new autogenerated files"Michele Scuttari
This reverts commit 2be8af8f0e0780901213b6fd3013a5268ddc3359.
2022-08-30[MLIR] Update pass declarations to new autogenerated filesMichele Scuttari
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure. Reviewed By: mehdi_amini, rriddle Differential Review: https://reviews.llvm.org/D132838
2022-01-02Apply clang-tidy fixes for performance-move-const-arg to MLIR (NFC)Mehdi Amini
2022-01-02Apply clang-tidy fixes for performance-for-range-copy to MLIR (NFC)Mehdi Amini
2021-12-08Adjust "end namespace" comment in MLIR to match new agree'd coding styleMehdi Amini
See D115115 and this mailing list discussion: https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html Differential Revision: https://reviews.llvm.org/D115309
2021-07-05[mlir-reduce] Improve diagnostic message and clean build dependencyChia-hung Duan
Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D104443
2021-06-02[mlir-reduce] Reducer refactor.Chia-hung Duan
* A Reducer is a kind of RewritePattern, so it's just the same as writing graph rewrite. * ReductionTreePass operates on Operation rather than ModuleOp, so that * we are able to reduce a nested structure(e.g., module in module) by * self-nesting. Reviewed By: jpienaar, rriddle Differential Revision: https://reviews.llvm.org/D101046