This is an archive of the discontinued LLVM Phabricator instance.

[mlir][transform] Simplify TrackingListener test case
ClosedPublic

Authored by springerm on Jun 8 2023, 7:41 AM.

Details

Summary

Use the default TrackingListener. No need to set up a derived listener just for the test case. This revision is in preparation of a future change that adds a TrackingRewriter infrastructure.

Depends On: D152426

Diff Detail

Event Timeline

springerm created this revision.Jun 8 2023, 7:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2023, 7:41 AM
springerm requested review of this revision.Jun 8 2023, 7:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2023, 7:41 AM
ftynse accepted this revision.Jun 9 2023, 12:44 AM
ftynse added inline comments.
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td
470
471

We can also create an unregistered op from OperationState using RewriterBase::create and then call RewriterBase::replaceOp. I don't have a preference here.

This revision is now accepted and ready to land.Jun 9 2023, 12:44 AM
springerm added inline comments.Jun 9 2023, 2:18 AM
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td
471

This is needed for D152438. It adds a new notifyOperationReplaced(Operation*, Operation*) overload that is only triggered by replaceOpWithNewOp<OpTy> but not replaceOp(Operation*, ValueRange).

This revision was automatically updated to reflect the committed changes.
springerm marked an inline comment as done.