This is an archive of the discontinued LLVM Phabricator instance.

[mlir][bufferize] Fix config not passed to greedy rewriter
ClosedPublic

Authored by springerm on Mar 12 2022, 6:34 AM.

Details

Summary

Also add a TODO to switch to a custom walk instead of the GreedyPatternRewriter, which should be more efficient. (The bufferization pattern is guaranteed to apply only a single time for every op, so a simple walk should suffice.)

We currently specify a top-to-bottom walk order. This is important because other walk orders could introduce additional casts and/or buffer copies. These canonicalize away again, but it is more efficient to never generate them in the first place.

Note: A few of these canonicalizations are not yet implemented.

Diff Detail

Event Timeline

springerm created this revision.Mar 12 2022, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 12 2022, 6:34 AM
springerm requested review of this revision.Mar 12 2022, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 12 2022, 6:34 AM
gysit accepted this revision.Mar 14 2022, 2:55 AM
This revision is now accepted and ready to land.Mar 14 2022, 2:55 AM
nicolasvasilache accepted this revision.Mar 14 2022, 4:08 AM