[all-commits] [llvm/llvm-project] 0289a2: [mlir] Add support for filtering patterns based on...
River Riddle via All-commits
all-commits at lists.llvm.org
Wed Jun 2 12:05:51 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0289a2692e0e1b6b846f0627262d15daa58160ac
https://github.com/llvm/llvm-project/commit/0289a2692e0e1b6b846f0627262d15daa58160ac
Author: River Riddle <riddleriver at gmail.com>
Date: 2021-06-02 (Wed, 02 Jun 2021)
Changed paths:
M mlir/docs/PatternRewriter.md
M mlir/include/mlir/IR/PatternMatch.h
M mlir/include/mlir/Pass/PassOptions.h
M mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h
A mlir/include/mlir/Rewrite/PassUtil.td
M mlir/include/mlir/Transforms/Passes.td
M mlir/lib/Rewrite/FrozenRewritePatternSet.cpp
M mlir/lib/Transforms/Canonicalizer.cpp
M mlir/test/Pass/pipeline-options-parsing.mlir
A mlir/test/Transforms/test-canonicalize-filter.mlir
M mlir/test/lib/Dialect/Test/TestDialect.cpp
Log Message:
-----------
[mlir] Add support for filtering patterns based on debug names and labels
This revision allows for attaching "debug labels" to patterns, and provides to FrozenRewritePatternSet for filtering patterns based on these labels (in addition to the debug name of the pattern). This will greatly simplify the ability to write tests targeted towards specific patterns (in cases where many patterns may interact), will also simplify debugging pattern application by observing how application changes when enabling/disabling specific patterns.
To enable better reuse of pattern rewrite options between passes, this revision also adds a new PassUtil.td file to the Rewrite/ library that will allow for passes to easily hook into a common interface for pattern debugging. Two options are used to seed this utility, `disable-patterns` and `enable-patterns`, which are used to enable the filtering behavior indicated above.
Differential Revision: https://reviews.llvm.org/D102441
More information about the All-commits
mailing list