CIRCT 24.0.0git
Loading...
Searching...
No Matches
RTGTypes.h
Go to the documentation of this file.
1//===- RTGTypes.h - RTG dialect types ---------------------------*- 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#ifndef CIRCT_DIALECT_RTG_IR_RTGTYPES_H
10#define CIRCT_DIALECT_RTG_IR_RTGTYPES_H
11
12#include "mlir/IR/BuiltinAttributes.h"
13#include "mlir/IR/BuiltinTypes.h"
14#include "mlir/IR/SymbolTable.h"
15#include "mlir/IR/Types.h"
16
17namespace circt {
18namespace rtg {
19
20/// Defines an entry in an `!rtg.dict`.
21struct DictEntry {
22 mlir::StringAttr name;
23 mlir::Type type;
24};
25
26inline bool operator<(const DictEntry &entry, const DictEntry &other) {
27 return entry.name.getValue() < other.name.getValue();
28}
29
30inline bool operator==(const DictEntry &entry, const DictEntry &other) {
31 return entry.name == other.name && entry.type == other.type;
32}
33
34inline llvm::hash_code hash_value(const DictEntry &entry) {
35 return llvm::hash_combine(entry.name, entry.type);
36}
37
38} // namespace rtg
39} // namespace circt
40
41#define GET_TYPEDEF_CLASSES
42#include "circt/Dialect/RTG/IR/RTGTypes.h.inc"
43
44#endif // CIRCT_DIALECT_RTG_IR_RTGTYPES_H
bool operator==(const DictEntry &entry, const DictEntry &other)
Definition RTGTypes.h:30
bool operator<(const DictEntry &entry, const DictEntry &other)
Definition RTGTypes.h:26
llvm::hash_code hash_value(const DictEntry &entry)
Definition RTGTypes.h:34
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Defines an entry in an !rtg.dict.
Definition RTGTypes.h:21
mlir::StringAttr name
Definition RTGTypes.h:22