Remove ops in regions/blocks from worklist when parent op is being removed via Greedy...
authorAndy Ly <lyandy@google.com>
Tue, 6 Aug 2019 18:08:22 +0000 (11:08 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 6 Aug 2019 18:08:54 +0000 (11:08 -0700)
commit55f2e24ab34f5873f89fc7de7cb8975f8acd48a8
treef3948af9965e364573248d16a323f4c7ebd29801
parent641fc7007c5cc554d8edd137257cbb9aca69e5c6
Remove ops in regions/blocks from worklist when parent op is being removed via GreedyPatternRewriteDriver::replaceOp.

This fixes a bug where ops inside the parent op are visited even though the parent op has been removed.

PiperOrigin-RevId: 261953580
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
mlir/test/Transforms/test-canonicalize.mlir [new file with mode: 0644]
mlir/test/lib/TestDialect/TestDialect.cpp
mlir/test/lib/TestDialect/TestOps.td