[PATCH] D78484: Providing buffer assignment for MLIR

Ehsan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 04:48:00 PDT 2020


dfki-ehna created this revision.
Herald added subscribers: llvm-commits, frgossen, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini, mgorny.
Herald added a project: LLVM.
dfki-ehna added reviewers: mehdi_amini, rriddle, herhut, pifon2a.

We have provided a generic buffer assignment transformation ported from TensorFlow. This generic transformation pass automatically analyzes the values and their aliases (also in other blocks) and returns the valid positions for Alloc and Dealloc operations. To find these positions, the algorithm uses the block Dominator and Post-Dominator analyses. In our proposed algorithm, we have considered aliasing, liveness, nested regions, branches, conditional branches, critical edges, and independency to custom block terminators. This implementation doesn't support block loops. However, we have considered this in our design. For this purpose, it is only required to have a loop analysis to insert Alloc and Dealloc operations outside of these loops in some special cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78484

Files:
  mlir/include/mlir/Transforms/BufferAssignment.h
  mlir/lib/Transforms/BufferAssignment.cpp
  mlir/lib/Transforms/CMakeLists.txt
  mlir/test/Transforms/buffer-assignment-prepration.mlir
  mlir/test/Transforms/buffer-assignment.mlir
  mlir/test/lib/Transforms/CMakeLists.txt
  mlir/test/lib/Transforms/TestBufferAssignment.cpp
  mlir/tools/mlir-opt/mlir-opt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78484.258702.patch
Type: text/x-patch
Size: 48108 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200420/a25486f7/attachment.bin>


More information about the llvm-commits mailing list