llvm-project/mlir/lib/Interfaces/CopyOpInterface.cpp
Ehsan Toosi 0f03b2bfda [mlir] Add redundant copy removal transform
This pass removes redundant dialect-independent Copy operations in different
situations like the following:

%from = ...
%to = ...
... (no user/alias for %to)
copy(%from, %to)
... (no user/alias for %from)
dealloc %from
use(%to)

Differential Revision: https://reviews.llvm.org/D82757
2020-07-03 15:36:25 +02:00

19 lines
734 B
C++

//===- CopyOpInterface.cpp - Copy operations interface in MLIR ------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "mlir/Interfaces/CopyOpInterface.h"
using namespace mlir;
//===----------------------------------------------------------------------===//
// CopyOp Interface
//===----------------------------------------------------------------------===//
/// Include the definitions of the copy operation interface.
#include "mlir/Interfaces/CopyOpInterface.cpp.inc"