[all-commits] [llvm/llvm-project] a2b837: [mlir] GreedyPatternRewriteDriver: Entry point tak...

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Jan 27 02:24:46 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a2b837ab0448869c74cc042155dd454833c60d62
      https://github.com/llvm/llvm-project/commit/a2b837ab0448869c74cc042155dd454833c60d62
  Author: Matthias Springer <springerm at google.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
    M mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
    M mlir/lib/Dialect/MemRef/Transforms/ExpandStridedMetadata.cpp
    M mlir/lib/Dialect/MemRef/Transforms/FoldMemRefAliasOps.cpp
    M mlir/lib/Dialect/MemRef/Transforms/ResolveShapedTypeResultDims.cpp
    M mlir/lib/Dialect/Vector/Transforms/LowerVectorMask.cpp
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
    M mlir/test/lib/Dialect/Test/TestPatterns.cpp

  Log Message:
  -----------
  [mlir] GreedyPatternRewriteDriver: Entry point takes single region

The rewrite driver is typically applied to a single region or all regions of the same op. There is no longer an overload to apply the rewrite driver to a list of regions.

This simplifies the rewrite driver implementation because the scope is now a single region as opposed to a list of regions.

Note: This change is not NFC because `config.maxIterations` and `config.maxNumRewrites` is now counted for each region separately. Furthermore, worklist filtering (`scope`) is now applied to each region separately.

Differential Revision: https://reviews.llvm.org/D142611




More information about the All-commits mailing list