This is an archive of the discontinued LLVM Phabricator instance.

[mlir] GreedyPatternRewriteDriver: Entry point takes single region
ClosedPublic

Authored by springerm on Jan 26 2023, 2:52 AM.

Details

Summary

The rewrite driver is typically applied to a single region or all regions of the same op. There is no longer an overload to apply the rewrite driver to a list of regions.

This simplifies the rewrite driver implementation because the scope is now a single region as opposed to a list of regions.

Note: This change is not NFC because config.maxIterations and config.maxNumRewrites is now counted for each region separately.

Depends On: D141949

Diff Detail

Event Timeline

springerm created this revision.Jan 26 2023, 2:52 AM
springerm requested review of this revision.Jan 26 2023, 2:52 AM
Herald added a project: Restricted Project. · View Herald Transcript
springerm edited the summary of this revision. (Show Details)Jan 26 2023, 2:53 AM

Note: This change is not NFC because config.maxIterations and config.maxNumRewrites is now counted for each region separately.

I think it isn't NFC also because regions are processed separately rather than together right?
Now we'll be reaching fix-point on regions in isolation and the worklist filtering won't add operations outside of the current region.

mehdi_amini accepted this revision.Jan 26 2023, 5:04 PM
This revision is now accepted and ready to land.Jan 26 2023, 5:04 PM
This revision was landed with ongoing or failed builds.Jan 27 2023, 2:24 AM
This revision was automatically updated to reflect the committed changes.

Note: This change is not NFC because config.maxIterations and config.maxNumRewrites is now counted for each region separately.

I think it isn't NFC also because regions are processed separately rather than together right?
Now we'll be reaching fix-point on regions in isolation and the worklist filtering won't add operations outside of the current region.

Expanded commit message.