16#include "mlir/IR/Builders.h"
17#include "mlir/IR/DialectImplementation.h"
18#include "llvm/ADT/TypeSwitch.h"
28 if (
auto array = hw::type_dyn_cast<hw::ArrayType>(type))
29 return array.getElementType();
30 if (
auto array = hw::type_dyn_cast<hw::UnpackedArrayType>(type))
31 return array.getElementType();
43 if (
auto inout = dyn_cast_or_null<InOutType>(type))
44 return inout.getElementType();
55 if (
auto net = dyn_cast_or_null<NetType>(type))
56 return net.getElementType();
67 if (
auto var = dyn_cast_or_null<VarType>(type))
68 return var.getElementType();
77#define GET_TYPEDEF_CLASSES
78#include "circt/Dialect/SV/SVTypes.cpp.inc"
80void SVDialect::registerTypes() {
82#define GET_TYPEDEF_LIST
83#include "circt/Dialect/SV/SVTypes.cpp.inc"
mlir::Type getVarElementType(mlir::Type type)
Return the element type of a VarType or null if the operand isn't a Var type.
mlir::Type getAnyHWArrayElementType(mlir::Type type)
Return the element type of an ArrayType or UnpackedArrayType, or null if the operand isn't an array.
mlir::Type getNetElementType(mlir::Type type)
Return the element type of a NetType or null if the operand isn't a Net type.
mlir::Type getInOutElementType(mlir::Type type)
Return the element type of an InOutType or null if the operand isn't an InOut type.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.