This is an archive of the discontinued LLVM Phabricator instance.

[mlir][SCF][bufferize] Implement `resolveConflicts` for SCF ops
ClosedPublic

Authored by springerm on Jun 1 2022, 1:25 PM.

Details

Summary

scf::ForOp and scf::WhileOp must insert buffer copies not only for out-of-place bufferizations, but also to enforce additional invariants wrt. to buffer aliasing behavior. This is currently happening in the respective bufferize methods. With this change, the tensor copy insertion pass will also enforce these invariants by inserting copies. The bufferize methods can then be simplified and made independent of the AnalysisState data structure in a subsequent change.

Depends On D126821

Diff Detail

Event Timeline

springerm created this revision.Jun 1 2022, 1:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 1:25 PM
springerm requested review of this revision.Jun 1 2022, 1:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 1:25 PM
aartbik accepted this revision.Jun 14 2022, 8:48 AM
aartbik added inline comments.
mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
234

in variants -> invariants

This revision is now accepted and ready to land.Jun 14 2022, 8:48 AM
This revision was landed with ongoing or failed builds.Jun 15 2022, 12:07 AM
This revision was automatically updated to reflect the committed changes.
springerm marked an inline comment as done.Jun 15 2022, 1:00 AM