CIRCT 23.0.0git
Loading...
Searching...
No Matches
Macros | Functions
OMOps.cpp File Reference
#include "circt/Dialect/OM/OMOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/OM/OMOpInterfaces.h"
#include "circt/Dialect/OM/OMUtils.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/SymbolTable.h"
#include "llvm/ADT/STLExtras.h"
#include "circt/Dialect/OM/OM.cpp.inc"
Include dependency graph for OMOps.cpp:

Go to the source code of this file.

Macros

#define GET_OP_CLASSES
 

Functions

static ParseResult parseBasePathString (OpAsmParser &parser, PathAttr &path)
 
static void printBasePathString (OpAsmPrinter &p, Operation *op, PathAttr path)
 
static ParseResult parsePathString (OpAsmParser &parser, PathAttr &path, StringAttr &module, StringAttr &ref, StringAttr &field)
 
static void printPathString (OpAsmPrinter &p, Operation *op, PathAttr path, StringAttr module, StringAttr ref, StringAttr field)
 
static ParseResult parseFieldLocs (OpAsmParser &parser, ArrayAttr &fieldLocs)
 
static void printFieldLocs (OpAsmPrinter &printer, Operation *op, ArrayAttr fieldLocs)
 
static ParseResult parseClassFieldsList (OpAsmParser &parser, SmallVectorImpl< Attribute > &fieldNames, SmallVectorImpl< Type > &fieldTypes)
 
static ParseResult parseClassLike (OpAsmParser &parser, OperationState &state)
 
static void printClassLike (ClassLike classLike, OpAsmPrinter &printer)
 
LogicalResult verifyClassLike (ClassLike classLike)
 
void getClassLikeAsmBlockArgumentNames (ClassLike classLike, Region &region, OpAsmSetValueNameFn setNameFn)
 
NamedAttribute makeFieldType (StringAttr name, Type type)
 
NamedAttribute makeFieldIdx (MLIRContext *ctx, mlir::StringAttr name, unsigned i)
 
std::optional< Type > getClassLikeFieldType (ClassLike classLike, StringAttr name)
 
void replaceClassLikeFieldTypes (ClassLike classLike, AttrTypeReplacer &replacer)
 
static FailureOr< ClassLike > verifyClassLikeSymbolUser (Operation *op, SymbolTableCollection &symbolTable, ClassType resultType, StringAttr className)
 
static OpFoldResult foldIntegerBinaryArithmetic (IntegerBinaryOp op, Attribute lhsAttr, Attribute rhsAttr)
 
static OpFoldResult foldIntegerBitwise (IntegerBinaryOp op, Attribute lhsAttr, Attribute rhsAttr)
 
static bool isZeroInt (Attribute a)
 
static bool isAllOnesInt (Attribute a)
 

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 1153 of file OMOps.cpp.

Function Documentation

◆ foldIntegerBinaryArithmetic()

static OpFoldResult foldIntegerBinaryArithmetic ( IntegerBinaryOp  op,
Attribute  lhsAttr,
Attribute  rhsAttr 
)
static

Definition at line 747 of file OMOps.cpp.

◆ foldIntegerBitwise()

static OpFoldResult foldIntegerBitwise ( IntegerBinaryOp  op,
Attribute  lhsAttr,
Attribute  rhsAttr 
)
static

Definition at line 1042 of file OMOps.cpp.

◆ getClassLikeAsmBlockArgumentNames()

void getClassLikeAsmBlockArgumentNames ( ClassLike  classLike,
Region &  region,
OpAsmSetValueNameFn  setNameFn 
)

Definition at line 264 of file OMOps.cpp.

◆ getClassLikeFieldType()

std::optional< Type > getClassLikeFieldType ( ClassLike  classLike,
StringAttr  name 
)

Definition at line 286 of file OMOps.cpp.

◆ isAllOnesInt()

static bool isAllOnesInt ( Attribute  a)
static

Definition at line 1064 of file OMOps.cpp.

◆ isZeroInt()

static bool isZeroInt ( Attribute  a)
static

Definition at line 1058 of file OMOps.cpp.

◆ makeFieldIdx()

NamedAttribute makeFieldIdx ( MLIRContext *  ctx,
mlir::StringAttr  name,
unsigned  i 
)

Definition at line 280 of file OMOps.cpp.

◆ makeFieldType()

NamedAttribute makeFieldType ( StringAttr  name,
Type  type 
)

Definition at line 276 of file OMOps.cpp.

◆ parseBasePathString()

static ParseResult parseBasePathString ( OpAsmParser &  parser,
PathAttr &  path 
)
static

Definition at line 29 of file OMOps.cpp.

References context, and circt::om::parseBasePath().

◆ parseClassFieldsList()

static ParseResult parseClassFieldsList ( OpAsmParser &  parser,
SmallVectorImpl< Attribute > &  fieldNames,
SmallVectorImpl< Type > &  fieldTypes 
)
static

Definition at line 103 of file OMOps.cpp.

Referenced by parseClassLike().

◆ parseClassLike()

static ParseResult parseClassLike ( OpAsmParser &  parser,
OperationState &  state 
)
static

Definition at line 135 of file OMOps.cpp.

References parseClassFieldsList().

◆ parseFieldLocs()

static ParseResult parseFieldLocs ( OpAsmParser &  parser,
ArrayAttr &  fieldLocs 
)
static

Definition at line 80 of file OMOps.cpp.

◆ parsePathString()

static ParseResult parsePathString ( OpAsmParser &  parser,
PathAttr &  path,
StringAttr &  module,
StringAttr &  ref,
StringAttr &  field 
)
static

Definition at line 51 of file OMOps.cpp.

References context, and circt::om::parsePath().

◆ printBasePathString()

static void printBasePathString ( OpAsmPrinter &  p,
Operation *  op,
PathAttr  path 
)
static

Definition at line 40 of file OMOps.cpp.

References circt::om::PathElement::instance.

◆ printClassLike()

static void printClassLike ( ClassLike  classLike,
OpAsmPrinter &  printer 
)
static

Definition at line 192 of file OMOps.cpp.

◆ printFieldLocs()

static void printFieldLocs ( OpAsmPrinter &  printer,
Operation *  op,
ArrayAttr  fieldLocs 
)
static

Definition at line 90 of file OMOps.cpp.

◆ printPathString()

static void printPathString ( OpAsmPrinter &  p,
Operation *  op,
PathAttr  path,
StringAttr  module,
StringAttr  ref,
StringAttr  field 
)
static

Definition at line 65 of file OMOps.cpp.

◆ replaceClassLikeFieldTypes()

void replaceClassLikeFieldTypes ( ClassLike  classLike,
AttrTypeReplacer &  replacer 
)

Definition at line 296 of file OMOps.cpp.

◆ verifyClassLike()

LogicalResult verifyClassLike ( ClassLike  classLike)

Definition at line 247 of file OMOps.cpp.

◆ verifyClassLikeSymbolUser()

static FailureOr< ClassLike > verifyClassLikeSymbolUser ( Operation *  op,
SymbolTableCollection &  symbolTable,
ClassType  resultType,
StringAttr  className 
)
static

Definition at line 553 of file OMOps.cpp.