16 #include "mlir/IR/Builders.h"
17 #include "mlir/IR/DialectImplementation.h"
18 #include "llvm/ADT/TypeSwitch.h"
20 using namespace circt;
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();
53 #define GET_TYPEDEF_CLASSES
54 #include "circt/Dialect/SV/SVTypes.cpp.inc"
56 void SVDialect::registerTypes() {
58 #define GET_TYPEDEF_LIST
59 #include "circt/Dialect/SV/SVTypes.cpp.inc"
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 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.