This is an archive of the discontinued LLVM Phabricator instance.

[mlir][bufferization] Fix buffer-loop-hoisting with deallocs
Needs ReviewPublic

Authored by springerm on Oct 2 2022, 7:22 PM.

Details

Summary

buffer-loop-hoisting did not support IR with deallocs (and silently produced invalid IR; the alloc was hoisted but not the dealloc). This change adds support for simple cases where the alloc is in the same block as the dealloc (if any). buffer-loop-hoisting bails on all unsupported cases instead of producing incorrect IR.

Depends On D135054

Diff Detail