[mlir] Async: add automatic reference counting at async.runtime operations level
authorEugene Zhulenev <ezhulenev@google.com>
Mon, 12 Apr 2021 17:48:02 +0000 (10:48 -0700)
committerEugene Zhulenev <ezhulenev@google.com>
Tue, 13 Apr 2021 01:54:55 +0000 (18:54 -0700)
commita6628e596e70bf5c31058dec582c8a7907928e98
treecb9b62c49f67777c57f3c11e2a6cbb1d2e8220c1
parent3fc1fe8db830524596bee0d35814d76e5d17ed39
[mlir] Async: add automatic reference counting at async.runtime operations level

Depends On D95311

Previous automatic-ref-counting pass worked with high level async operations (e.g. async.execute), however async values reference counting is a runtime implementation detail.

New pass mostly relies on the save liveness analysis to place drop_ref operations, and does better verification of CFG with different liveIn sets in block successors.

This is almost NFC change. No new reference counting ideas, just a cleanup of the previous version.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D95390
17 files changed:
mlir/include/mlir/Dialect/Async/Passes.h
mlir/include/mlir/Dialect/Async/Passes.td
mlir/lib/Dialect/Async/Transforms/AsyncRefCounting.cpp [deleted file]
mlir/lib/Dialect/Async/Transforms/AsyncRefCountingOptimization.cpp [deleted file]
mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCounting.cpp [new file with mode: 0644]
mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCountingOpt.cpp [new file with mode: 0644]
mlir/lib/Dialect/Async/Transforms/CMakeLists.txt
mlir/test/Dialect/Async/async-ref-counting-optimization.mlir [deleted file]
mlir/test/Dialect/Async/async-ref-counting.mlir [deleted file]
mlir/test/Dialect/Async/async-runtime-ref-counting-opt.mlir [new file with mode: 0644]
mlir/test/Dialect/Async/async-runtime-ref-counting.mlir [new file with mode: 0644]
mlir/test/Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir
mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir
mlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir
mlir/test/mlir-cpu-runner/async-group.mlir
mlir/test/mlir-cpu-runner/async-value.mlir
mlir/test/mlir-cpu-runner/async.mlir