• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===- CopyOpInterface.td - Copy operation interface -------*- tablegen -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Defines the interface for copy-like operations.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_INTERFACES_COPYOPINTERFACE
14#define MLIR_INTERFACES_COPYOPINTERFACE
15
16include "mlir/IR/OpBase.td"
17
18def CopyOpInterface : OpInterface<"CopyOpInterface"> {
19  let description = [{
20    A copy-like operation is one that copies from source value to target value.
21  }];
22  let cppNamespace = "::mlir";
23
24  let methods = [
25    InterfaceMethod<
26      /*desc=*/"Returns the source value for this copy operation",
27      /*retTy=*/"Value",
28      /*methodName=*/"getSource"
29    >,
30    InterfaceMethod<
31      /*desc=*/"Returns the target value for this copy operation",
32      /*retTy=*/"Value",
33      /*methodName=*/"getTarget"
34    >
35  ];
36}
37
38#endif // MLIR_INTERFACES_COPYOPINTERFACE
39