[all-commits] [llvm/llvm-project] 724a0e: [mlir] GreedyPatternRewriteDriver: Ignore scope wh...

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Feb 3 00:57:12 PST 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 724a0e2c2d7a5724dd81b00db470ba4bb8b616ca
  Author: Matthias Springer <springerm at google.com>
  Date:   2023-02-03 (Fri, 03 Feb 2023)

  Changed paths:
    M mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp

  Log Message:
  [mlir] GreedyPatternRewriteDriver: Ignore scope when rewriting top-level ops

Top-level ModuleOps cannot be transformed with the GreedyPatternRewriteDriver since D141945 because they do not have an enclosing region that could be used as a scope. Make the scope optional inside GreedyPatternRewriteDriver, so that top-level ops can be processed when they are on the initial list of ops.

Note: This does not allow users to bypass the scoping mechanism by setting `config.scope = nullptr`.

Fixes #60462.

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

More information about the All-commits mailing list