CIRCT  19.0.0git
HandshakeInterfaces.h
Go to the documentation of this file.
1 //===- HandshakeInterfaces.h - Handshake op interfaces ----------*- C++ -*-===//
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 // This file defines the interfaces of the handshake dialect.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef CIRCT_DIALECT_HANDSHAKE_HANDSHAKEINTERFACES_H
14 #define CIRCT_DIALECT_HANDSHAKE_HANDSHAKEINTERFACES_H
15 
17 #include "circt/Support/LLVM.h"
18 #include "mlir/IR/OpDefinition.h"
19 #include "mlir/IR/OpImplementation.h"
20 #include "mlir/IR/Operation.h"
21 #include "mlir/Interfaces/CallInterfaces.h"
22 #include "mlir/Interfaces/FunctionInterfaces.h"
23 #include "mlir/Interfaces/InferTypeOpInterface.h"
24 #include "mlir/Interfaces/SideEffectInterfaces.h"
25 #include "llvm/ADT/Any.h"
26 
27 namespace circt {
28 namespace handshake {
29 
31  unsigned index;
32  mlir::Value addressIn;
33  mlir::Value dataOut;
34  mlir::Value doneOut;
35 };
36 
38  unsigned index;
39  mlir::Value addressIn;
40  mlir::Value dataIn;
41  mlir::Value doneOut;
42 };
43 
44 /// Default implementation for checking whether an operation is a control
45 /// operation. This function cannot be defined within ControlInterface
46 /// because its implementation attempts to cast the operation to an
47 /// SOSTInterface, which may not be declared at the point where the default
48 /// trait's method is defined. Therefore, the default implementation of
49 /// ControlInterface's isControl method simply calls this function.
50 bool isControlOpImpl(Operation *op);
51 } // end namespace handshake
52 } // end namespace circt
53 
54 #include "circt/Dialect/Handshake/HandshakeInterfaces.h.inc"
55 
56 #endif // CIRCT_DIALECT_HANDSHAKE_HANDSHAKEINTERFACES_H
bool isControlOpImpl(Operation *op)
Default implementation for checking whether an operation is a control operation.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21