MLIR
20.0.0git
|
This class allows control over how the GreedyPatternRewriteDriver works. More...
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
Public Attributes | |
bool | useTopDownTraversal = false |
This specifies the order of initial traversal that populates the rewriters worklist. More... | |
GreedySimplifyRegionLevel | enableRegionSimplification |
Perform control flow optimizations to the region tree after applying all patterns. More... | |
int64_t | maxIterations = 10 |
This specifies the maximum number of times the rewriter will iterate between applying patterns and simplifying regions. More... | |
int64_t | maxNumRewrites = kNoLimit |
This specifies the maximum number of rewrites within an iteration. More... | |
Region * | scope = nullptr |
Only ops within the scope are added to the worklist. More... | |
GreedyRewriteStrictness | strictMode = GreedyRewriteStrictness::AnyOp |
Strict mode can restrict the ops that are added to the worklist during the rewrite. More... | |
RewriterBase::Listener * | listener = nullptr |
An optional listener that should be notified about IR modifications. More... | |
Static Public Attributes | |
static constexpr int64_t | kNoLimit = -1 |
This class allows control over how the GreedyPatternRewriteDriver works.
Definition at line 43 of file GreedyPatternRewriteDriver.h.
GreedySimplifyRegionLevel mlir::GreedyRewriteConfig::enableRegionSimplification |
Perform control flow optimizations to the region tree after applying all patterns.
Note: Only applicable when simplifying entire regions.
Definition at line 58 of file GreedyPatternRewriteDriver.h.
|
staticconstexpr |
Definition at line 72 of file GreedyPatternRewriteDriver.h.
RewriterBase::Listener* mlir::GreedyRewriteConfig::listener = nullptr |
An optional listener that should be notified about IR modifications.
Definition at line 93 of file GreedyPatternRewriteDriver.h.
int64_t mlir::GreedyRewriteConfig::maxIterations = 10 |
This specifies the maximum number of times the rewriter will iterate between applying patterns and simplifying regions.
Use kNoLimit
to disable this iteration limit.
Note: Only applicable when simplifying entire regions.
Definition at line 66 of file GreedyPatternRewriteDriver.h.
Referenced by mlir::applyPatternsAndFoldGreedily().
int64_t mlir::GreedyRewriteConfig::maxNumRewrites = kNoLimit |
This specifies the maximum number of rewrites within an iteration.
Use kNoLimit
to disable this limit.
Definition at line 70 of file GreedyPatternRewriteDriver.h.
Referenced by mlir::applyOpPatternsAndFold().
Region* mlir::GreedyRewriteConfig::scope = nullptr |
Only ops within the scope are added to the worklist.
If no scope is specified, the closest enclosing region around the initial list of ops (or the specified region, depending on which greedy rewrite entry point is used) is used as a scope.
Definition at line 78 of file GreedyPatternRewriteDriver.h.
Referenced by mlir::applyOpPatternsAndFold(), and mlir::applyPatternsAndFoldGreedily().
GreedyRewriteStrictness mlir::GreedyRewriteConfig::strictMode = GreedyRewriteStrictness::AnyOp |
Strict mode can restrict the ops that are added to the worklist during the rewrite.
Definition at line 90 of file GreedyPatternRewriteDriver.h.
Referenced by mlir::affine::affineForOpBodySkew(), applyPatterns(), mlir::affine::hoistAffineIfOp(), and mlir::spirv::unrollVectorsInSignatures().
bool mlir::GreedyRewriteConfig::useTopDownTraversal = false |
This specifies the order of initial traversal that populates the rewriters worklist.
When set to true, it walks the operations top-down, which is generally more efficient in compile time. When set to false, its initial traversal of the region tree is bottom up on each block, which may match larger patterns when given an ambiguous pattern set.
Note: Only applicable when simplifying entire regions.
Definition at line 52 of file GreedyPatternRewriteDriver.h.