This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][bufferize] Support scf::IfOp
ClosedPublic

Authored by springerm on Oct 16 2021, 12:06 AM.

Details

Summary

This commit adds support for scf::IfOp to comprehensive bufferization. Support is currently limited to cases where both branches yield tensors that bufferize to the same buffer.

To keep the analysis simple, scf::IfOp are treated as memory writes for analysis purposes, even if no op inside any branch is writing. (scf::ForOps are handled in the same way.)

Depends On D111957

Diff Detail

Event Timeline

springerm created this revision.Oct 16 2021, 12:06 AM
springerm requested review of this revision.Oct 16 2021, 12:07 AM
nicolasvasilache accepted this revision.Oct 21 2021, 7:56 AM
nicolasvasilache added inline comments.
mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
964

you should be able to do this now?

1020

first sentence sounds weird, can you rephrase?

This revision is now accepted and ready to land.Oct 21 2021, 7:56 AM
This revision was landed with ongoing or failed builds.Oct 21 2021, 6:13 PM
This revision was automatically updated to reflect the committed changes.
springerm marked 2 inline comments as done.