CIRCT 24.0.0git
Loading...
Searching...
No Matches
ArcOps.cpp File Reference
#include "circt/Dialect/Arc/ArcOps.h"
#include "circt/Dialect/HW/HWOpInterfaces.h"
#include "circt/Dialect/HW/HWTypes.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/Interfaces/FunctionImplementation.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/TypeSwitch.h"
#include "circt/Dialect/Arc/ArcInterfaces.cpp.inc"
#include "circt/Dialect/Arc/Arc.cpp.inc"
Include dependency graph for ArcOps.cpp:

Go to the source code of this file.

Macros

#define GET_OP_CLASSES

Functions

static LogicalResult verifyTypeListEquivalence (Operation *op, TypeRange expectedTypeList, TypeRange actualTypeList, StringRef elementName)
static LogicalResult verifyArcSymbolUse (Operation *op, TypeRange inputs, TypeRange results, SymbolTableCollection &symbolTable)
static bool isSupportedModuleOp (Operation *moduleOp)
static Operation * getSupportedModuleOp (SymbolTableCollection &symbolTable, Operation *pointing, StringAttr symbol)
 Fetches the operation pointed to by pointing with name symbol, checking that it is a supported model operation for simulation.
static std::optional< hw::ModulePort > getModulePort (Operation *moduleOp, StringRef portName)
static FailureOr< unsigned > getVectorWidth (Type base, Type vectorized)
static LogicalResult verifyCoroutineCallTypes (Operation *op, FlatSymbolRefAttr callee, TypeRange operands, TypeRange results, SymbolTableCollection &symTable)
 Resolve the callee symbol to a CoroutineDefineOp and verify that the given operand and result types match its function type.
static LogicalResult verifyCoroutineTerminator (Operation *op, TypeRange yieldOperands)

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 910 of file ArcOps.cpp.

Function Documentation

◆ getModulePort()

std::optional< hw::ModulePort > getModulePort ( Operation * moduleOp,
StringRef portName )
static

Definition at line 102 of file ArcOps.cpp.

References circt::hw::ModulePort::name.

◆ getSupportedModuleOp()

Operation * getSupportedModuleOp ( SymbolTableCollection & symbolTable,
Operation * pointing,
StringAttr symbol )
static

Fetches the operation pointed to by pointing with name symbol, checking that it is a supported model operation for simulation.

Definition at line 84 of file ArcOps.cpp.

References isSupportedModuleOp().

◆ getVectorWidth()

FailureOr< unsigned > getVectorWidth ( Type base,
Type vectorized )
static

Definition at line 406 of file ArcOps.cpp.

References failure().

◆ isSupportedModuleOp()

bool isSupportedModuleOp ( Operation * moduleOp)
static

Definition at line 78 of file ArcOps.cpp.

Referenced by getSupportedModuleOp().

◆ verifyArcSymbolUse()

LogicalResult verifyArcSymbolUse ( Operation * op,
TypeRange inputs,
TypeRange results,
SymbolTableCollection & symbolTable )
static

Definition at line 52 of file ArcOps.cpp.

References assert(), failure(), success(), and verifyTypeListEquivalence().

◆ verifyCoroutineCallTypes()

LogicalResult verifyCoroutineCallTypes ( Operation * op,
FlatSymbolRefAttr callee,
TypeRange operands,
TypeRange results,
SymbolTableCollection & symTable )
static

Resolve the callee symbol to a CoroutineDefineOp and verify that the given operand and result types match its function type.

Definition at line 717 of file ArcOps.cpp.

References failure(), success(), and verifyTypeListEquivalence().

◆ verifyCoroutineTerminator()

LogicalResult verifyCoroutineTerminator ( Operation * op,
TypeRange yieldOperands )
static

Definition at line 824 of file ArcOps.cpp.

References verifyTypeListEquivalence().

◆ verifyTypeListEquivalence()

LogicalResult verifyTypeListEquivalence ( Operation * op,
TypeRange expectedTypeList,
TypeRange actualTypeList,
StringRef elementName )
static

Definition at line 30 of file ArcOps.cpp.

References success().

Referenced by verifyArcSymbolUse(), verifyCoroutineCallTypes(), and verifyCoroutineTerminator().