#include "mlir/Dialect/Async/Passes.h"
#include "mlir/Dialect/Async/IR/Async.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/Debug.h"
namespace mlir {
#define GEN_PASS_DEF_ASYNCRUNTIMEREFCOUNTINGOPT
#include "mlir/Dialect/Async/Passes.h.inc"
}
#define DEBUG_TYPE …
usingnamespacemlir;
usingnamespacemlir::async;
namespace {
class AsyncRuntimeRefCountingOptPass
: public impl::AsyncRuntimeRefCountingOptBase<
AsyncRuntimeRefCountingOptPass> { … };
}
LogicalResult AsyncRuntimeRefCountingOptPass::optimizeReferenceCounting(
Value value, llvm::SmallDenseMap<Operation *, Operation *> &cancellable) { … }
void AsyncRuntimeRefCountingOptPass::runOnOperation() { … }
std::unique_ptr<Pass> mlir::createAsyncRuntimeRefCountingOptPass() { … }