CIRCT 20.0.0git
Loading...
Searching...
No Matches
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
17using namespace circt;
18using namespace rtgtest;
19
20//===----------------------------------------------------------------------===//
21// CPUDeclOp
22//===----------------------------------------------------------------------===//
23
24size_t CPUDeclOp::getIdentifier(size_t idx) { return getId().getId(); }
25
26mlir::OpFoldResult CPUDeclOp::fold(FoldAdaptor adaptor) { return getId(); }
27
28//===----------------------------------------------------------------------===//
29// ConstantTestOp
30//===----------------------------------------------------------------------===//
31
32mlir::OpFoldResult ConstantTestOp::fold(FoldAdaptor adaptor) {
33 return getValueAttr();
34}
35
36//===----------------------------------------------------------------------===//
37// TableGen generated logic.
38//===----------------------------------------------------------------------===//
39
40// Provide the autogenerated implementation guts for the Op classes.
41#define GET_OP_CLASSES
42#include "circt/Dialect/RTGTest/IR/RTGTest.cpp.inc"
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.