[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
Loading
Please sign in to comment