This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][bufferize] Support std.select bufferization
ClosedPublic

Authored by springerm on Jan 8 2022, 12:45 PM.

Details

Summary

This op is an example for how to deal with ops who's OpResult may aliasing with one of multiple OpOperands.

Diff Detail

Event Timeline

springerm created this revision.Jan 8 2022, 12:45 PM
springerm requested review of this revision.Jan 8 2022, 12:45 PM
mlir/test/Dialect/Linalg/comprehensive-module-bufferize.mlir
1226

TODO: we also need a test case where std.select needs to bufferize out of place.

add test cases

Please leave a TODO somewhere that you can improve this to making 0 or 1 copies (e.g. dynamically if you put your copy operations under the same conditional as the switch; or something else as we discussed offline).
Atm you make 0, 1 or 2 copies quite greedily.

This revision is now accepted and ready to land.Jan 12 2022, 12:09 AM
springerm marked an inline comment as done.

address comments

This revision was landed with ongoing or failed builds.Jan 12 2022, 12:51 AM
This revision was automatically updated to reflect the committed changes.