google / google/heir

Investigate uses of Greedy Pattern Rewrite Driver

Open
#1,221 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
MLIR
Stars
906
Forks
171
Avg merge
4d 12h
Merged PRs (30d)
32

Description

There have been two (somewhat) recent changes in the upstream rewrite drivers:

1. The simpler [Walk Pattern Rewrite Driver](https://mlir.llvm.org/docs/PatternRewriter/#walk-pattern-rewrite-driver) has been added for situations where the fixed point iteration of the greedy rewriter is not necessary
2. The usual way to use the Greed Rewriter, `applyPatternsAndFoldGreedily` has been changed to `applyPatternsGreedily` with the decision on whether or not to also fold now configurable via the `GreedyRewriteConfig` parameter. Currently this defaults to still folding.

The TODO here is to investigate which of our passes that use the greedy rewrite driver can be dropped to a simple walk, and which applications of the greedy rewriter can have the folding dropped (and, e.g., moved to a later step in a pipeline).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.