MLIR
21.0.0git
|
This class allows control over how the GreedyPatternRewriteDriver works. More...
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
Public Member Functions | |
bool | getUseTopDownTraversal () const |
This specifies the order of initial traversal that populates the rewriters worklist. More... | |
GreedyRewriteConfig & | setUseTopDownTraversal (bool use=true) |
GreedySimplifyRegionLevel | getRegionSimplificationLevel () const |
Perform control flow optimizations to the region tree after applying all patterns. More... | |
GreedyRewriteConfig & | setRegionSimplificationLevel (GreedySimplifyRegionLevel level) |
int64_t | getMaxIterations () const |
This specifies the maximum number of times the rewriter will iterate between applying patterns and simplifying regions. More... | |
GreedyRewriteConfig & | setMaxIterations (int64_t iterations) |
int64_t | getMaxNumRewrites () const |
This specifies the maximum number of rewrites within an iteration. More... | |
GreedyRewriteConfig & | setMaxNumRewrites (int64_t limit) |
Region * | getScope () const |
Only ops within the scope are added to the worklist. More... | |
GreedyRewriteConfig & | setScope (Region *scope) |
GreedyRewriteStrictness | getStrictness () const |
Strict mode can restrict the ops that are added to the worklist during the rewrite. More... | |
GreedyRewriteConfig & | setStrictness (GreedyRewriteStrictness mode) |
RewriterBase::Listener * | getListener () const |
An optional listener that should be notified about IR modifications. More... | |
GreedyRewriteConfig & | setListener (RewriterBase::Listener *listener) |
bool | isFoldingEnabled () const |
Whether this should fold while greedily rewriting. More... | |
GreedyRewriteConfig & | enableFolding (bool enable=true) |
bool | isConstantCSEEnabled () const |
If set to "true", constants are CSE'd (even across multiple regions that are in a parent-ancestor relationship). More... | |
GreedyRewriteConfig & | enableConstantCSE (bool enable=true) |
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.
|
inline |
Definition at line 135 of file GreedyPatternRewriteDriver.h.
|
inline |
Definition at line 127 of file GreedyPatternRewriteDriver.h.
|
inline |
An optional listener that should be notified about IR modifications.
Definition at line 119 of file GreedyPatternRewriteDriver.h.
|
inline |
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 76 of file GreedyPatternRewriteDriver.h.
|
inline |
This specifies the maximum number of rewrites within an iteration.
Use kNoLimit
to disable this limit.
Definition at line 84 of file GreedyPatternRewriteDriver.h.
|
inline |
Perform control flow optimizations to the region tree after applying all patterns.
Note: Only applicable when simplifying entire regions.
Definition at line 62 of file GreedyPatternRewriteDriver.h.
|
inline |
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 96 of file GreedyPatternRewriteDriver.h.
|
inline |
Strict mode can restrict the ops that are added to the worklist during the rewrite.
Definition at line 112 of file GreedyPatternRewriteDriver.h.
|
inline |
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.
|
inline |
If set to "true", constants are CSE'd (even across multiple regions that are in a parent-ancestor relationship).
Definition at line 134 of file GreedyPatternRewriteDriver.h.
|
inline |
Whether this should fold while greedily rewriting.
Definition at line 126 of file GreedyPatternRewriteDriver.h.
|
inline |
Definition at line 120 of file GreedyPatternRewriteDriver.h.
|
inline |
Definition at line 77 of file GreedyPatternRewriteDriver.h.
|
inline |
Definition at line 85 of file GreedyPatternRewriteDriver.h.
|
inline |
Definition at line 66 of file GreedyPatternRewriteDriver.h.
|
inline |
Definition at line 97 of file GreedyPatternRewriteDriver.h.
|
inline |
Definition at line 113 of file GreedyPatternRewriteDriver.h.
Referenced by mlir::affine::affineForOpBodySkew(), applyPatterns(), and mlir::affine::hoistAffineIfOp().
|
inline |
Definition at line 53 of file GreedyPatternRewriteDriver.h.
|
staticconstexpr |
Definition at line 90 of file GreedyPatternRewriteDriver.h.