This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Insert static buffers as high as possible during ComprehensiveBufferization.
ClosedPublic

Authored by nicolasvasilache on Sep 13 2021, 5:41 AM.

Details

Summary

This revision allows hoisting static alloc/dealloc pairs as high as possible during ComprehensiveBufferization.
This also aligns such allocated buffers to 128B by default.

This change exhibited some issues wrt insertion points and a missing copy that are also fixed in this revision; tests are updated accordingly.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Sep 13 2021, 5:42 AM

Revert spurious test changes.

Drop spurious test file.

ftynse accepted this revision.Sep 13 2021, 8:37 AM
ftynse added inline comments.
mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
1469

There's AutomaticAllocationScope trait, but it may not apply here since you are doing dynamic allocations.

This revision is now accepted and ready to land.Sep 13 2021, 8:37 AM