CIRCT  20.0.0git
Macros | Functions
MooreTypes.cpp File Reference
#include "circt/Dialect/Moore/MooreTypes.h"
#include "circt/Dialect/Moore/MooreDialect.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/DialectImplementation.h"
#include "llvm/ADT/TypeSwitch.h"
#include "circt/Dialect/Moore/MooreTypes.cpp.inc"
Include dependency graph for MooreTypes.cpp:

Go to the source code of this file.

Macros

#define GET_TYPEDEF_CLASSES
 
#define GET_TYPEDEF_LIST
 

Functions

static LogicalResult parseMembers (AsmParser &parser, SmallVector< StructLikeMember > &members)
 Parse a list of struct members. More...
 
static void printMembers (AsmPrinter &printer, ArrayRef< StructLikeMember > members)
 Print a list of struct members. More...
 
static ParseResult parseMooreType (AsmParser &parser, Type &type)
 Parse a type registered with this dialect. More...
 
static void printMooreType (Type type, AsmPrinter &printer)
 Print a type registered with this dialect. More...
 
static LogicalResult verifyAllMembersPacked (function_ref< InFlightDiagnostic()> emitError, ArrayRef< StructLikeMember > members)
 
static std::optional< DenseMap< Attribute, Type > > getAllSubelementIndexMap (ArrayRef< StructLikeMember > members)
 
static Type getTypeAtAllIndex (ArrayRef< StructLikeMember > members, Attribute index)
 
static std::optional< uint32_t > getFieldAllIndex (ArrayRef< StructLikeMember > members, StringAttr nameField)
 

Macro Definition Documentation

◆ GET_TYPEDEF_CLASSES

#define GET_TYPEDEF_CLASSES

Definition at line 314 of file MooreTypes.cpp.

◆ GET_TYPEDEF_LIST

#define GET_TYPEDEF_LIST

Function Documentation

◆ getAllSubelementIndexMap()

static std::optional<DenseMap<Attribute, Type> > getAllSubelementIndexMap ( ArrayRef< StructLikeMember members)
static

Definition at line 206 of file MooreTypes.cpp.

References circt::calyx::direction::get().

◆ getFieldAllIndex()

static std::optional<uint32_t> getFieldAllIndex ( ArrayRef< StructLikeMember members,
StringAttr  nameField 
)
static

Definition at line 227 of file MooreTypes.cpp.

◆ getTypeAtAllIndex()

static Type getTypeAtAllIndex ( ArrayRef< StructLikeMember members,
Attribute  index 
)
static

Definition at line 213 of file MooreTypes.cpp.

References circt::calyx::direction::get().

◆ parseMembers()

static LogicalResult parseMembers ( AsmParser &  parser,
SmallVector< StructLikeMember > &  members 
)
static

Parse a list of struct members.

Definition at line 154 of file MooreTypes.cpp.

References circt::calyx::direction::get().

◆ parseMooreType()

static ParseResult parseMooreType ( AsmParser &  parser,
Type &  type 
)
static

Parse a type registered with this dialect.

Definition at line 329 of file MooreTypes.cpp.

References circt::moore::FourValued, circt::calyx::direction::get(), isdigit, circt::moore::TwoValued, and width.

Referenced by circt::moore::UnpackedType::parse().

◆ printMembers()

static void printMembers ( AsmPrinter &  printer,
ArrayRef< StructLikeMember members 
)
static

Print a list of struct members.

Definition at line 169 of file MooreTypes.cpp.

◆ printMooreType()

static void printMooreType ( Type  type,
AsmPrinter &  printer 
)
static

Print a type registered with this dialect.

Definition at line 356 of file MooreTypes.cpp.

References assert(), and circt::moore::TwoValued.

Referenced by circt::moore::UnpackedType::print().

◆ verifyAllMembersPacked()

static LogicalResult verifyAllMembersPacked ( function_ref< InFlightDiagnostic()>  emitError,
ArrayRef< StructLikeMember members 
)
static

Definition at line 182 of file MooreTypes.cpp.