CIRCT  20.0.0git
RTGTestOps.cpp
Go to the documentation of this file.
1 //===- RTGTestOps.cpp - Implement the RTG operations ----------------------===//
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 implements the RTGTest ops.
10 //
11 //===----------------------------------------------------------------------===//
12 
14 #include "mlir/IR/Builders.h"
15 #include "llvm/ADT/APInt.h"
16 
17 using namespace circt;
18 using namespace rtgtest;
19 
20 //===----------------------------------------------------------------------===//
21 // CPUDeclOp
22 //===----------------------------------------------------------------------===//
23 
24 size_t CPUDeclOp::getIdentifier(size_t idx) { return getId().getZExtValue(); }
25 
26 //===----------------------------------------------------------------------===//
27 // ConstantTestOp
28 //===----------------------------------------------------------------------===//
29 
30 mlir::OpFoldResult ConstantTestOp::fold(FoldAdaptor adaptor) {
31  return getValueAttr();
32 }
33 
34 //===----------------------------------------------------------------------===//
35 // TableGen generated logic.
36 //===----------------------------------------------------------------------===//
37 
38 // Provide the autogenerated implementation guts for the Op classes.
39 #define GET_OP_CLASSES
40 #include "circt/Dialect/RTGTest/IR/RTGTest.cpp.inc"
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21