This is an archive of the discontinued LLVM Phabricator instance.

[mlir][bufferize][NFC] Use custom walk instead of GreedyPatternRewriter
ClosedPublic

Authored by springerm on Apr 12 2022, 9:26 AM.

Details

Summary

The bufferization driver was previously using a GreedyPatternRewriter. This was problematic because bufferization must traverse ops top-to-bottom. The GreedyPatternRewriter was previously configured via useTopDownTraversal, but this was a hack; this API was just meant for performance improvements and should not affect the result of the rewrite.

Depends On D123617

Diff Detail

Event Timeline

springerm created this revision.Apr 12 2022, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2022, 9:26 AM
springerm requested review of this revision.Apr 12 2022, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2022, 9:26 AM

This commit fixes the incorrect usage of GreedyPatternRewriter as requested by @mehdi_amini.

mlir/test/Dialect/Tensor/bufferize.mlir
75

I deleted this test case because I think it does make sense.

pifon2a accepted this revision.Apr 20 2022, 12:12 AM
This revision is now accepted and ready to land.Apr 20 2022, 12:12 AM
This revision was landed with ongoing or failed builds.Apr 22 2022, 2:23 AM
This revision was automatically updated to reflect the committed changes.