-
Notifications
You must be signed in to change notification settings - Fork 10.7k
/
MaskingOpInterface.td
58 lines (54 loc) · 2.05 KB
/
MaskingOpInterface.td
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//===- MaskingOpInterfaces.td - MaskingOpInterface Decls = -*- tablegen -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// This is the definition file for the MaskingOpInterface.
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_DIALECT_VECTOR_INTERFACES_MASKINGOPINTERFACE_TD
#define MLIR_DIALECT_VECTOR_INTERFACES_MASKINGOPINTERFACE_TD
include "mlir/IR/OpBase.td"
def MaskingOpInterface : OpInterface<"MaskingOpInterface"> {
let description = [{
The 'MaskingOpInterface' defines an vector operation that can apply masking
to its own or other vector operations.
}];
let cppNamespace = "::mlir::vector";
let methods = [
InterfaceMethod<
/*desc=*/"Returns the mask value of this masking operation.",
/*retTy=*/"mlir::Value",
/*methodName=*/"getMask",
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/"">,
InterfaceMethod<
/*desc=*/"Returns the operation masked by this masking operation.",
// TODO: Return a MaskableOpInterface when interface infra can handle
// dependences between interfaces.
/*retTy=*/"Operation *",
/*methodName=*/"getMaskableOp",
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/"">,
InterfaceMethod<
/*desc=*/"Returns true if the masking operation has a passthru value.",
/*retTy=*/"bool",
/*methodName=*/"hasPassthru",
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/"">,
InterfaceMethod<
/*desc=*/"Returns the passthru value of this masking operation.",
/*retTy=*/"mlir::Value",
/*methodName=*/"getPassthru",
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/"">,
];
}
#endif // MLIR_DIALECT_VECTOR_INTERFACES_MASKINGOPINTERFACE_TD