This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Transforms][NFC] GreedyPatternRewriteDriver: Add worklist class
ClosedPublic

Authored by springerm on May 24 2023, 9:19 AM.

Details

Summary

Encapsulate all worklist-related functionality in a separate Worklist class. This makes the remaining code more readable and allows for custom worklist implementations (e.g., a randomized worklist for fuzzing pattern application: D142447).

Diff Detail

Event Timeline

springerm created this revision.May 24 2023, 9:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2023, 9:19 AM
springerm requested review of this revision.May 24 2023, 9:19 AM
rriddle accepted this revision.May 24 2023, 9:45 AM
rriddle added inline comments.
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
58–62

Seems like this could be a trivial llvm::any_of.

This revision is now accepted and ready to land.May 24 2023, 9:45 AM
This revision was automatically updated to reflect the committed changes.
springerm marked an inline comment as done.