CIRCT 20.0.0git
Loading...
Searching...
No Matches
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)
 
ModuleInfo getModuleInfo (FModuleLike module)
 

Private Member Functions

unsigned getID (void *object)
 
unsigned finalizeID (void *object)
 
unsigned getInnerSymID (StringAttr name)
 
void update (OpOperand &operand)
 
void update (const void *pointer)
 
void update (size_t value)
 
void update (TypeID typeID)
 
void update (BundleType type)
 
void update (Type type)
 
void update (OpResult result)
 
void update (Operation *op, DictionaryAttr dict)
 Hash the top level attribute dictionary of the operation.
 
void update (mlir::OperationName name)
 
void update (Block *block)
 
void update (Region *region)
 
void update (Operation *op)
 

Private Attributes

DenseMap< void *, unsigned > idTable
 
unsigned nextID = 0
 
DenseMap< StringAttr, unsigned > innerSymIDTable
 
unsigned nextInnerSymID = 0
 
std::vector< StringAttr > referredModuleNames
 
const StructuralHasherSharedConstantsconstants
 
llvm::SHA256 sha
 
size_t position = 0
 

Detailed Description

Definition at line 144 of file Dedup.cpp.

Constructor & Destructor Documentation

◆ StructuralHasher()

StructuralHasher::StructuralHasher ( const StructuralHasherSharedConstants constants)
inlineexplicit

Definition at line 145 of file Dedup.cpp.

Member Function Documentation

◆ finalizeID()

unsigned StructuralHasher::finalizeID ( void *  object)
inlineprivate

Definition at line 163 of file Dedup.cpp.

References idTable, and nextID.

Referenced by update(), and update().

◆ getID()

unsigned StructuralHasher::getID ( void *  object)
inlineprivate

Definition at line 155 of file Dedup.cpp.

References idTable, and nextID.

Referenced by update().

◆ getInnerSymID()

unsigned StructuralHasher::getInnerSymID ( StringAttr  name)
inlineprivate

Definition at line 172 of file Dedup.cpp.

References innerSymIDTable, and nextInnerSymID.

Referenced by update().

◆ getModuleInfo()

ModuleInfo StructuralHasher::getModuleInfo ( FModuleLike  module)
inline

Definition at line 148 of file Dedup.cpp.

References referredModuleNames, sha, and update().

◆ update() [1/12]

void StructuralHasher::update ( Block *  block)
inlineprivate

Definition at line 314 of file Dedup.cpp.

References finalizeID(), position, and update().

◆ update() [2/12]

void StructuralHasher::update ( BundleType  type)
inlineprivate

Definition at line 209 of file Dedup.cpp.

References update().

◆ update() [3/12]

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

Definition at line 196 of file Dedup.cpp.

References circt::firrtl::addr, and sha.

◆ update() [4/12]

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

Definition at line 308 of file Dedup.cpp.

References update().

◆ update() [5/12]

void StructuralHasher::update ( Operation *  op)
inlineprivate

Definition at line 333 of file Dedup.cpp.

References finalizeID(), position, and update().

◆ update() [6/12]

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

◆ update() [7/12]

void StructuralHasher::update ( OpOperand &  operand)
inlineprivate

Definition at line 179 of file Dedup.cpp.

References getID(), and update().

Referenced by getModuleInfo(), update(), update(), update(), update(), update(), update(), update(), update(), and update().

◆ update() [8/12]

void StructuralHasher::update ( OpResult  result)
inlineprivate

Definition at line 224 of file Dedup.cpp.

References referredModuleNames, and update().

◆ update() [9/12]

void StructuralHasher::update ( Region *  region)
inlineprivate

Definition at line 325 of file Dedup.cpp.

References position, and update().

◆ update() [10/12]

void StructuralHasher::update ( size_t  value)
inlineprivate

Definition at line 201 of file Dedup.cpp.

References circt::firrtl::addr, and sha.

◆ update() [11/12]

void StructuralHasher::update ( Type  type)
inlineprivate

Definition at line 218 of file Dedup.cpp.

References update().

◆ update() [12/12]

void StructuralHasher::update ( TypeID  typeID)
inlineprivate

Definition at line 206 of file Dedup.cpp.

References update().

Referenced by update().

Member Data Documentation

◆ constants

const StructuralHasherSharedConstants& StructuralHasher::constants
private

Definition at line 372 of file Dedup.cpp.

Referenced by update().

◆ idTable

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

Definition at line 361 of file Dedup.cpp.

Referenced by finalizeID(), and getID().

◆ innerSymIDTable

DenseMap<StringAttr, unsigned> StructuralHasher::innerSymIDTable
private

Definition at line 365 of file Dedup.cpp.

Referenced by getInnerSymID().

◆ nextID

unsigned StructuralHasher::nextID = 0
private

Definition at line 362 of file Dedup.cpp.

Referenced by finalizeID(), and getID().

◆ nextInnerSymID

unsigned StructuralHasher::nextInnerSymID = 0
private

Definition at line 366 of file Dedup.cpp.

Referenced by getInnerSymID().

◆ position

size_t StructuralHasher::position = 0
private

Definition at line 379 of file Dedup.cpp.

Referenced by update(), update(), and update().

◆ referredModuleNames

std::vector<StringAttr> StructuralHasher::referredModuleNames
private

Definition at line 369 of file Dedup.cpp.

Referenced by getModuleInfo(), update(), and update().

◆ sha

llvm::SHA256 StructuralHasher::sha
private

Definition at line 376 of file Dedup.cpp.

Referenced by getModuleInfo(), update(), and update().


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