This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Improve comprehensive bufferization for scf.yield.
ClosedPublic

Authored by nicolasvasilache on Jul 12 2021, 3:16 AM.

Details

Summary

Previously, comprehensive bufferization of scf.yield did not have enough information
to detect whether an enclosing scf::for bbargs would bufferize to a buffer equivalent
to that of the matching scf::yield operand.
As a consequence a separate sanity check step would be required to determine whether
bufferization occured properly.
This late check would miss the case of calling a function in an loop.

Instead, we now pass and update aliasInfo during bufferization and it is possible to
imrpove bufferization of scf::yield and drop that post-pass check.

Add an example use case that was failing previously.
This slightly modifies the error conditions, which are also updated as part of this
revision.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Jul 12 2021, 3:16 AM
ftynse accepted this revision.Jul 12 2021, 3:34 AM
This revision is now accepted and ready to land.Jul 12 2021, 3:34 AM
This revision was landed with ongoing or failed builds.Jul 12 2021, 3:36 AM
This revision was automatically updated to reflect the committed changes.