CIRCT  19.0.0git
Classes | Functions
LowerClasses.cpp File Reference
#include "PassDetails.h"
#include "circt/Dialect/FIRRTL/FIRRTLAnnotationHelper.h"
#include "circt/Dialect/FIRRTL/FIRRTLDialect.h"
#include "circt/Dialect/FIRRTL/FIRRTLTypes.h"
#include "circt/Dialect/FIRRTL/FIRRTLUtils.h"
#include "circt/Dialect/FIRRTL/OwningModuleCache.h"
#include "circt/Dialect/HW/InnerSymbolNamespace.h"
#include "circt/Dialect/OM/OMAttributes.h"
#include "circt/Dialect/OM/OMOps.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/Threading.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for LowerClasses.cpp:

Go to the source code of this file.

Classes

struct  FIntegerConstantOpConversion
 
struct  BoolConstantOpConversion
 
struct  DoubleConstantOpConversion
 
struct  StringConstantOpConversion
 
struct  ListCreateOpConversion
 
struct  IntegerAddOpConversion
 
struct  IntegerMulOpConversion
 
struct  IntegerShrOpConversion
 
struct  PathOpConversion
 
struct  WireOpConversion
 
struct  AnyCastOpConversion
 
struct  ObjectSubfieldOpConversion
 
struct  ClassFieldOpConversion
 
struct  ClassExternFieldOpConversion
 
struct  ObjectOpConversion
 
struct  ClassOpSignatureConversion
 
struct  ClassExternOpSignatureConversion
 
struct  ObjectFieldOpConversion
 

Functions

static LogicalResult updateObjectInClass (firrtl::ObjectOp firrtlObject, const PathInfoTable &pathInfoTable, SmallVectorImpl< Operation * > &opsToErase)
 
static LogicalResult updateInstanceInClass (InstanceOp firrtlInstance, hw::HierPathOp hierPath, InstanceGraph &instanceGraph, const PathInfoTable &pathInfoTable, SmallVectorImpl< Operation * > &opsToErase)
 
static LogicalResult updateInstanceInModule (InstanceOp firrtlInstance, InstanceGraph &instanceGraph, SmallVectorImpl< Operation * > &opsToErase)
 
static LogicalResult updateInstancesInModule (FModuleOp moduleOp, InstanceGraph &instanceGraph, SmallVectorImpl< Operation * > &opsToErase)
 
static LogicalResult updateObjectsAndInstancesInClass (om::ClassOp classOp, InstanceGraph &instanceGraph, const LoweringState &state, const PathInfoTable &pathInfoTable, SmallVectorImpl< Operation * > &opsToErase)
 
static void populateConversionTarget (ConversionTarget &target)
 
static void populateTypeConverter (TypeConverter &converter)
 
static void populateRewritePatterns (RewritePatternSet &patterns, TypeConverter &converter, const PathInfoTable &pathInfoTable, const DenseMap< StringAttr, firrtl::ClassType > &classTypeTable)
 

Function Documentation

◆ populateConversionTarget()

static void populateConversionTarget ( ConversionTarget &  target)
static

Definition at line 1515 of file LowerClasses.cpp.

◆ populateRewritePatterns()

static void populateRewritePatterns ( RewritePatternSet &  patterns,
TypeConverter &  converter,
const PathInfoTable &  pathInfoTable,
const DenseMap< StringAttr, firrtl::ClassType > &  classTypeTable 
)
static

Definition at line 1640 of file LowerClasses.cpp.

◆ populateTypeConverter()

static void populateTypeConverter ( TypeConverter &  converter)
static

Definition at line 1559 of file LowerClasses.cpp.

References assert(), builder, elementType, and circt::calyx::direction::get().

◆ updateInstanceInClass()

static LogicalResult updateInstanceInClass ( InstanceOp  firrtlInstance,
hw::HierPathOp  hierPath,
InstanceGraph instanceGraph,
const PathInfoTable &  pathInfoTable,
SmallVectorImpl< Operation * > &  opsToErase 
)
static

◆ updateInstanceInModule()

static LogicalResult updateInstanceInModule ( InstanceOp  firrtlInstance,
InstanceGraph instanceGraph,
SmallVectorImpl< Operation * > &  opsToErase 
)
static

Definition at line 1015 of file LowerClasses.cpp.

References builder, and circt::igraph::InstanceGraph::replaceInstance().

Referenced by updateInstancesInModule().

◆ updateInstancesInModule()

static LogicalResult updateInstancesInModule ( FModuleOp  moduleOp,
InstanceGraph instanceGraph,
SmallVectorImpl< Operation * > &  opsToErase 
)
static

Definition at line 1043 of file LowerClasses.cpp.

References assert(), builder, and updateInstanceInModule().

◆ updateObjectInClass()

static LogicalResult updateObjectInClass ( firrtl::ObjectOp  firrtlObject,
const PathInfoTable &  pathInfoTable,
SmallVectorImpl< Operation * > &  opsToErase 
)
static

Definition at line 815 of file LowerClasses.cpp.

References builder, circt::calyx::direction::get(), and numElements.

Referenced by updateObjectsAndInstancesInClass().

◆ updateObjectsAndInstancesInClass()

static LogicalResult updateObjectsAndInstancesInClass ( om::ClassOp  classOp,
InstanceGraph instanceGraph,
const LoweringState &  state,
const PathInfoTable &  pathInfoTable,
SmallVectorImpl< Operation * > &  opsToErase 
)
static

Definition at line 1057 of file LowerClasses.cpp.

References builder, updateInstanceInClass(), and updateObjectInClass().