Skip to content
Commit 724a0e2c authored by Matthias Springer's avatar Matthias Springer
Browse files

[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
parent 4cda8e62
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment