MLIR  15.0.0git
mlir::GreedyRewriteConfig Class Reference

This class allows control over how the GreedyPatternRewriteDriver works. More...

#include "mlir/Transforms/GreedyPatternRewriteDriver.h"

Collaboration diagram for mlir::GreedyRewriteConfig:

## Public Attributes

bool useTopDownTraversal = false
This specifies the order of initial traversal that populates the rewriters worklist. More...

bool enableRegionSimplification = true

int64_t maxIterations = 10
This specifies the maximum number of times the rewriter will iterate between applying patterns and simplifying regions. More...

## Static Public Attributes

static constexpr int64_t kNoIterationLimit = -1

## Detailed Description

This class allows control over how the GreedyPatternRewriteDriver works.

Definition at line 22 of file GreedyPatternRewriteDriver.h.

## ◆ enableRegionSimplification

 bool mlir::GreedyRewriteConfig::enableRegionSimplification = true

Definition at line 33 of file GreedyPatternRewriteDriver.h.

## ◆ kNoIterationLimit

 constexpr int64_t mlir::GreedyRewriteConfig::kNoIterationLimit = -1
static

Definition at line 40 of file GreedyPatternRewriteDriver.h.

Referenced by mlir::applyPatternsAndFoldGreedily().

## ◆ maxIterations

 int64_t mlir::GreedyRewriteConfig::maxIterations = 10

This specifies the maximum number of times the rewriter will iterate between applying patterns and simplifying regions.

Use kNoIterationLimit to disable this iteration limit.

Definition at line 38 of file GreedyPatternRewriteDriver.h.

Referenced by mlir::applyOpPatternsAndFold(), and mlir::applyPatternsAndFoldGreedily().

## ◆ useTopDownTraversal

 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.

Definition at line 29 of file GreedyPatternRewriteDriver.h.

Referenced by mlir::linalg::populateElementwiseOpsFusionPatterns().

The documentation for this class was generated from the following file: