CIRCT  20.0.0git
HWTypeInterfaces.h
Go to the documentation of this file.
1 //===- HWTypeInterfaces.h - Declare HW type interfaces ----------*- 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 // This file declares type interfaces for the HW Dialect.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef CIRCT_DIALECT_HW_HWTYPEINTERFACES_H
14 #define CIRCT_DIALECT_HW_HWTYPEINTERFACES_H
15 
16 #include "circt/Support/LLVM.h"
17 #include "mlir/IR/Types.h"
18 
19 namespace circt {
20 namespace hw {
21 namespace FieldIdImpl {
22 uint64_t getMaxFieldID(Type);
23 
24 std::pair<::mlir::Type, uint64_t> getSubTypeByFieldID(Type, uint64_t fieldID);
25 
26 ::mlir::Type getFinalTypeByFieldID(Type type, uint64_t fieldID);
27 
28 std::pair<uint64_t, bool> projectToChildFieldID(Type, uint64_t fieldID,
29  uint64_t index);
30 
31 std::pair<uint64_t, uint64_t> getIndexAndSubfieldID(Type type,
32  uint64_t fieldID);
33 
34 uint64_t getFieldID(Type type, uint64_t index);
35 
36 uint64_t getIndexForFieldID(Type type, uint64_t fieldID);
37 
38 } // namespace FieldIdImpl
39 } // namespace hw
40 } // namespace circt
41 
42 #include "circt/Dialect/HW/HWTypeInterfaces.h.inc"
43 
44 #endif // CIRCT_DIALECT_HW_HWTYPEINTERFACES_H
std::pair< uint64_t, uint64_t > getIndexAndSubfieldID(Type type, uint64_t fieldID)
uint64_t getFieldID(Type type, uint64_t index)
std::pair<::mlir::Type, uint64_t > getSubTypeByFieldID(Type, uint64_t fieldID)
std::pair< uint64_t, bool > projectToChildFieldID(Type, uint64_t fieldID, uint64_t index)
::mlir::Type getFinalTypeByFieldID(Type type, uint64_t fieldID)
uint64_t getIndexForFieldID(Type type, uint64_t fieldID)
uint64_t getMaxFieldID(Type)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21
Definition: hw.py:1