This is an archive of the discontinued LLVM Phabricator instance.

[mlir][bufferization] Allow to_memref ops in One-Shot Analysis
ClosedPublic

Authored by springerm on Jun 20 2023, 8:54 AM.

Details

Summary

bufferization.to_memref ops are allowed in One-Shot Bufferize, but they are treated conservatively: in the absence of a memref analysis, we have to assume that the result buffer is read and written.

Note: to_memref cannot introduce any future aliases that would have to be considered during One-Shot Bufferize, because only to_tensor ops with the restrict attribute are supported. Such tensors are guaranteed to not alias with any other buffer after bufferization.

Diff Detail

Event Timeline

springerm created this revision.Jun 20 2023, 8:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 8:54 AM
springerm requested review of this revision.Jun 20 2023, 8:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 8:54 AM
nicolasvasilache accepted this revision.Jun 20 2023, 8:55 AM
This revision is now accepted and ready to land.Jun 20 2023, 8:55 AM