CIRCT 24.0.0git
Loading...
Searching...
No Matches
InferResets.cpp File Reference
#include "circt/Analysis/FIRRTLInstanceInfo.h"
#include "circt/Dialect/FIRRTL/AnnotationDetails.h"
#include "circt/Dialect/FIRRTL/FIRRTLInstanceGraph.h"
#include "circt/Dialect/FIRRTL/FIRRTLOpInterfaces.h"
#include "circt/Dialect/FIRRTL/FIRRTLOps.h"
#include "circt/Dialect/FIRRTL/FIRRTLTypes.h"
#include "circt/Dialect/FIRRTL/FIRRTLUtils.h"
#include "circt/Dialect/FIRRTL/Passes.h"
#include "circt/Support/Debug.h"
#include "circt/Support/FieldRef.h"
#include "circt/Support/InstanceGraph.h"
#include "circt/Support/InstanceGraphInterface.h"
#include "mlir/IR/Dominance.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/Threading.h"
#include "mlir/Pass/Pass.h"
#include "llvm/ADT/EquivalenceClasses.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/LogicalResult.h"
#include "circt/Dialect/FIRRTL/Passes.h.inc"
Include dependency graph for InferResets.cpp:

Go to the source code of this file.

Classes

struct  llvm::DenseMapInfo< ResetSignal >

Namespaces

namespace  circt
 The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
namespace  circt::firrtl
namespace  llvm

Macros

#define DEBUG_TYPE   "infer-resets"
#define GEN_PASS_DEF_INFERRESETS

Functions

template<typename T>
static T & operator<< (T &os, const ResetKind &kind)
static unsigned getMaxFieldID (FIRRTLBaseType type)
static unsigned getFieldID (BundleType type, unsigned index)
static unsigned getFieldID (FVectorType type)
static unsigned getIndexForFieldID (BundleType type, unsigned fieldID)
static bool isUselessVec (FIRRTLBaseType oldType, unsigned fieldID)
static bool isUselessVec (FieldRef field)
static bool getDeclName (Value value, SmallString< 32 > &string)
static bool getFieldName (const FieldRef &fieldRef, SmallString< 32 > &string)
static bool typeContainsReset (Type type)
 Check whether a type contains a ResetType.
static FIRRTLBaseType updateType (FIRRTLBaseType oldType, unsigned fieldID, FIRRTLBaseType fieldType)
 Update the type of a single field within a type.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "infer-resets"

Definition at line 35 of file InferResets.cpp.

◆ GEN_PASS_DEF_INFERRESETS

#define GEN_PASS_DEF_INFERRESETS

Definition at line 39 of file InferResets.cpp.

Function Documentation

◆ getDeclName()

bool getDeclName ( Value value,
SmallString< 32 > & string )
static

Definition at line 419 of file InferResets.cpp.

◆ getFieldID() [1/2]

unsigned getFieldID ( BundleType type,
unsigned index )
static

Definition at line 363 of file InferResets.cpp.

References assert(), and getMaxFieldID().

Referenced by getFieldName(), isUselessVec(), and updateType().

◆ getFieldID() [2/2]

unsigned getFieldID ( FVectorType type)
static

Definition at line 371 of file InferResets.cpp.

◆ getFieldName()

◆ getIndexForFieldID()

unsigned getIndexForFieldID ( BundleType type,
unsigned fieldID )
static

Definition at line 373 of file InferResets.cpp.

References assert(), and getMaxFieldID().

Referenced by getFieldName(), isUselessVec(), and updateType().

◆ getMaxFieldID()

unsigned getMaxFieldID ( FIRRTLBaseType type)
static

◆ isUselessVec() [1/2]

◆ isUselessVec() [2/2]

bool isUselessVec ( FIRRTLBaseType oldType,
unsigned fieldID )
static

◆ operator<<()

template<typename T>
T & operator<< ( T & os,
const ResetKind & kind )
static

Definition at line 114 of file InferResets.cpp.

◆ typeContainsReset()

bool typeContainsReset ( Type type)
static

Check whether a type contains a ResetType.

Definition at line 481 of file InferResets.cpp.

◆ updateType()

FIRRTLBaseType updateType ( FIRRTLBaseType oldType,
unsigned fieldID,
FIRRTLBaseType fieldType )
static