CIRCT
20.0.0git
include
circt
Dialect
RTG
IR
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/Types.h"
15
16
namespace
circt
{
17
namespace
rtg
{
18
19
/// Defines an entry in an `!rtg.dict`.
20
struct
DictEntry
{
21
mlir::StringAttr
name
;
22
mlir::Type
type
;
23
};
24
25
inline
bool
operator<
(
const
DictEntry
&entry,
const
DictEntry
&other) {
26
return
entry.
name
.getValue() < other.
name
.getValue();
27
}
28
29
inline
bool
operator==
(
const
DictEntry
&entry,
const
DictEntry
&other) {
30
return
entry.
name
== other.
name
&& entry.
type
== other.
type
;
31
}
32
33
inline
llvm::hash_code
hash_value
(
const
DictEntry
&entry) {
34
return
llvm::hash_combine
(entry.
name
, entry.
type
);
35
}
36
37
}
// namespace rtg
38
}
// namespace circt
39
40
#define GET_TYPEDEF_CLASSES
41
#include "circt/Dialect/RTG/IR/RTGTypes.h.inc"
42
43
#endif
// CIRCT_DIALECT_RTG_IR_RTGTYPES_H
circt::rtg::operator==
bool operator==(const DictEntry &entry, const DictEntry &other)
Definition:
RTGTypes.h:29
circt::rtg::operator<
bool operator<(const DictEntry &entry, const DictEntry &other)
Definition:
RTGTypes.h:25
circt::rtg::hash_value
llvm::hash_code hash_value(const DictEntry &entry)
Definition:
RTGTypes.h:33
circt
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition:
DebugAnalysis.h:21
esi::utils::hash_combine
size_t hash_combine(size_t h1, size_t h2)
C++'s stdlib doesn't have a hash_combine function. This is a simple one.
Definition:
Utils.h:32
rtg
Definition:
rtg.py:1
circt::rtg::DictEntry
Defines an entry in an !rtg.dict.
Definition:
RTGTypes.h:20
circt::rtg::DictEntry::type
mlir::Type type
Definition:
RTGTypes.h:22
circt::rtg::DictEntry::name
mlir::StringAttr name
Definition:
RTGTypes.h:21
Generated on Sun Dec 22 2024 00:08:25 for CIRCT by
1.9.1