14 #ifndef MLIR_TRANSFORMS_GREEDYPATTERNREWRITEDRIVER_H_ 15 #define MLIR_TRANSFORMS_GREEDYPATTERNREWRITEDRIVER_H_ 81 bool *erased =
nullptr);
99 #endif // MLIR_TRANSFORMS_GREEDYPATTERNREWRITEDRIVER_H_ Include the generated interface declarations.
Operation is a basic unit of execution within MLIR.
MutableArrayRef< Region > getRegions()
Returns the regions held by this operation.
This class represents a frozen set of patterns that can be processed by a pattern applicator...
LogicalResult applyOpPatternsAndFold(Operation *op, const FrozenRewritePatternSet &patterns, bool *erased=nullptr)
Applies the specified patterns on op alone while also trying to fold it, by selecting the highest ben...
This class allows control over how the GreedyPatternRewriteDriver works.
bool useTopDownTraversal
This specifies the order of initial traversal that populates the rewriters worklist.
bool enableRegionSimplification
This class represents an efficient way to signal success or failure.
int64_t maxIterations
This specifies the maximum number of times the rewriter will iterate between applying patterns and si...
static constexpr int64_t kNoIterationLimit
LogicalResult applyPatternsAndFoldGreedily(MutableArrayRef< Region > regions, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig())
Rewrite the regions of the specified operation, which must be isolated from above, by repeatedly applying the highest benefit patterns in a greedy work-list driven manner.