CIRCT
24.0.0git
Loading...
Searching...
No Matches
include
circt
Dialect
OM
OMAttributes.h
Go to the documentation of this file.
1
//===- OMAttributes.h - Object Model attribute declarations ---------------===//
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 contains the Object Model attribute declarations.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef CIRCT_DIALECT_OM_OMATTRIBUTES_H
14
#define CIRCT_DIALECT_OM_OMATTRIBUTES_H
15
16
#include "
circt/Dialect/OM/OMDialect.h
"
17
#include "mlir/IR/BuiltinAttributes.h"
18
19
namespace
circt::om
{
20
21
/// A module name, and the name of an instance inside that module.
22
struct
PathElement
{
23
PathElement
(mlir::StringAttr
module
, mlir::StringAttr
instance
)
24
:
module
(
module
),
instance
(
instance
) {}
25
26
bool
operator==
(
const
PathElement
&rhs)
const
{
27
return
module
== rhs.module && instance == rhs.instance;
28
}
29
30
// NOLINTNEXTLINE(readability-identifier-naming)
31
friend
llvm::hash_code
hash_value
(
const
PathElement
&arg) {
32
return ::llvm::hash_combine(arg.
module
, arg.
instance
);
33
}
34
35
mlir::StringAttr
module
;
36
mlir::StringAttr
instance
;
37
};
38
}
// namespace circt::om
39
40
#include "
circt/Dialect/HW/HWAttributes.h
"
41
#include "mlir/IR/Attributes.h"
42
43
#define GET_ATTRDEF_CLASSES
44
#include "circt/Dialect/OM/OMAttributes.h.inc"
45
46
#endif
// CIRCT_DIALECT_OM_OMATTRIBUTES_H
HWAttributes.h
OMDialect.h
circt::om
Definition
Evaluator.h:30
circt::om::PathElement::operator==
bool operator==(const PathElement &rhs) const
Definition
OMAttributes.h:26
circt::om::PathElement::module
mlir::StringAttr module
Definition
OMAttributes.h:35
circt::om::PathElement::hash_value
friend llvm::hash_code hash_value(const PathElement &arg)
Definition
OMAttributes.h:31
circt::om::PathElement::PathElement
PathElement(mlir::StringAttr module, mlir::StringAttr instance)
Definition
OMAttributes.h:23
circt::om::PathElement::instance
mlir::StringAttr instance
Definition
OMAttributes.h:36
Generated on
for CIRCT by
1.15.0