CIRCT  20.0.0git
Public Member Functions | Private Member Functions | Private Attributes | List of all members
StructuralHasher Struct Reference
Collaboration diagram for StructuralHasher:
Collaboration graph
[legend]

Public Member Functions

 StructuralHasher (const StructuralHasherSharedConstants &constants)
 
std::pair< std::array< uint8_t, 32 >, SmallVector< StringAttr > > getHashAndModuleNames (FModuleLike module)
 

Private Member Functions

void update (const void *pointer)
 
void update (size_t value)
 
void update (TypeID typeID)
 
void update (BundleType type)
 
void update (Type type)
 
void record (void *address)
 
ValueId getId (Value val)
 Get the unique id for the specified value. More...
 
void update (OpResult result)
 
void update (ValueId index)
 
void update (OpOperand &operand)
 
void update (Operation *op, hw::InnerSymAttr attr)
 
void update (Value value, hw::InnerSymAttr attr)
 
void update (const SymbolTarget &target)
 
void update (InnerRefAttr attr)
 
void update (Operation *op, DictionaryAttr dict)
 Hash the top level attribute dictionary of the operation. More...
 
void update (mlir::OperationName name)
 
void update (Operation *op)
 

Private Attributes

DenseMap< void *, unsigned > indices
 
DenseMap< StringAttr, SymbolTargetinnerSymTargets
 
SmallVector< mlir::StringAttr > referredModuleNames
 
const StructuralHasherSharedConstantsconstants
 
llvm::SHA256 sha
 

Detailed Description

Definition at line 145 of file Dedup.cpp.

Constructor & Destructor Documentation

◆ StructuralHasher()

StructuralHasher::StructuralHasher ( const StructuralHasherSharedConstants constants)
inlineexplicit

Definition at line 146 of file Dedup.cpp.

Member Function Documentation

◆ getHashAndModuleNames()

std::pair<std::array<uint8_t, 32>, SmallVector<StringAttr> > StructuralHasher::getHashAndModuleNames ( FModuleLike  module)
inline

Definition at line 150 of file Dedup.cpp.

◆ getId()

ValueId StructuralHasher::getId ( Value  val)
inlineprivate

Get the unique id for the specified value.

Definition at line 192 of file Dedup.cpp.

◆ record()

void StructuralHasher::record ( void *  address)
inlineprivate

Definition at line 185 of file Dedup.cpp.

References assert().

◆ update() [1/15]

void StructuralHasher::update ( BundleType  type)
inlineprivate

Definition at line 170 of file Dedup.cpp.

◆ update() [2/15]

void StructuralHasher::update ( const SymbolTarget target)
inlineprivate

Definition at line 230 of file Dedup.cpp.

References SymbolTarget::fieldID, and SymbolTarget::index.

◆ update() [3/15]

void StructuralHasher::update ( const void *  pointer)
inlineprivate

Definition at line 157 of file Dedup.cpp.

References circt::firrtl::addr.

◆ update() [4/15]

void StructuralHasher::update ( InnerRefAttr  attr)
inlineprivate

Definition at line 235 of file Dedup.cpp.

References assert().

◆ update() [5/15]

void StructuralHasher::update ( mlir::OperationName  name)
inlineprivate

Definition at line 312 of file Dedup.cpp.

◆ update() [6/15]

void StructuralHasher::update ( Operation *  op)
inlineprivate

Definition at line 318 of file Dedup.cpp.

◆ update() [7/15]

void StructuralHasher::update ( Operation *  op,
DictionaryAttr  dict 
)
inlineprivate

Hash the top level attribute dictionary of the operation.

This function has special handling for inner symbols, ports, and referenced modules.

Definition at line 246 of file Dedup.cpp.

◆ update() [8/15]

void StructuralHasher::update ( Operation *  op,
hw::InnerSymAttr  attr 
)
inlineprivate

Definition at line 218 of file Dedup.cpp.

◆ update() [9/15]

void StructuralHasher::update ( OpOperand &  operand)
inlineprivate

Definition at line 216 of file Dedup.cpp.

References update().

Referenced by update().

◆ update() [10/15]

void StructuralHasher::update ( OpResult  result)
inlineprivate

Definition at line 199 of file Dedup.cpp.

◆ update() [11/15]

void StructuralHasher::update ( size_t  value)
inlineprivate

Definition at line 162 of file Dedup.cpp.

References circt::firrtl::addr.

◆ update() [12/15]

void StructuralHasher::update ( Type  type)
inlineprivate

Definition at line 179 of file Dedup.cpp.

◆ update() [13/15]

void StructuralHasher::update ( TypeID  typeID)
inlineprivate

Definition at line 167 of file Dedup.cpp.

References update().

Referenced by update().

◆ update() [14/15]

void StructuralHasher::update ( Value  value,
hw::InnerSymAttr  attr 
)
inlineprivate

Definition at line 224 of file Dedup.cpp.

◆ update() [15/15]

void StructuralHasher::update ( ValueId  index)
inlineprivate

Definition at line 211 of file Dedup.cpp.

References ValueId::index, and ValueId::offset.

Member Data Documentation

◆ constants

const StructuralHasherSharedConstants& StructuralHasher::constants
private

Definition at line 365 of file Dedup.cpp.

◆ indices

DenseMap<void *, unsigned> StructuralHasher::indices
private

Definition at line 356 of file Dedup.cpp.

◆ innerSymTargets

DenseMap<StringAttr, SymbolTarget> StructuralHasher::innerSymTargets
private

Definition at line 359 of file Dedup.cpp.

◆ referredModuleNames

SmallVector<mlir::StringAttr> StructuralHasher::referredModuleNames
private

Definition at line 362 of file Dedup.cpp.

◆ sha

llvm::SHA256 StructuralHasher::sha
private

Definition at line 369 of file Dedup.cpp.


The documentation for this struct was generated from the following file: