This is an archive of the discontinued LLVM Phabricator instance.

[mlir] GreedyPatternRewriteDriver: Add new strict mode option
ClosedPublic

Authored by springerm on Jan 17 2023, 1:05 AM.

Details

Summary

There are now three options:

  • AnyOp (previously false)
  • ExistingAndNewOps (previously true)
  • ExistingOps: this one is new.

The last option corresponds to what the applyOpPatternsAndFold(Operation*, ...) overload is doing. It is now also supported on the applyOpPatternsAndFold(ArrayRef<Operation *>, ...) overload.

Diff Detail

Event Timeline

springerm created this revision.Jan 17 2023, 1:05 AM
springerm requested review of this revision.Jan 17 2023, 1:05 AM
Herald added a project: Restricted Project. · View Herald Transcript
springerm edited the summary of this revision. (Show Details)Jan 17 2023, 1:06 AM
springerm updated this revision to Diff 489730.Jan 17 2023, 1:08 AM
springerm edited the summary of this revision. (Show Details)

rebase

mehdi_amini accepted this revision.Jan 19 2023, 8:51 AM
mehdi_amini added inline comments.
mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
605
mlir/test/Transforms/test-strict-pattern-driver.mlir
1–3

Since we're here, can you remove the allow-unregistered-dialect?

This revision is now accepted and ready to land.Jan 19 2023, 8:51 AM
This revision was automatically updated to reflect the committed changes.
springerm marked an inline comment as done.
springerm marked an inline comment as done.Jan 20 2023, 1:11 AM