CIRCT
20.0.0git
|
This class keeps track of global names at the module/interface level. More...
#include <ExportVerilogInternals.h>
Public Member Functions | |
GlobalNameTable (GlobalNameTable &&)=default | |
StringRef | getParameterVerilogName (Operation *module, StringAttr paramName) const |
Return the string to use for the specified parameter name in the specified module. More... | |
StringAttr | getEnumPrefix (Type type) const |
void | addReservedNames (NameCollisionResolver &nameResolver) const |
Private Member Functions | |
GlobalNameTable () | |
GlobalNameTable (const GlobalNameTable &)=delete | |
void | operator= (const GlobalNameTable &)=delete |
void | addRenamedParam (Operation *module, StringAttr oldName, StringRef newName) |
Private Attributes | |
DenseMap< std::pair< Operation *, Attribute >, StringAttr > | renamedParams |
This contains entries for any parameters that got renamed. More... | |
DenseMap< Type, StringAttr > | enumPrefixes |
DenseSet< StringAttr > | reservedNames |
List of names which are marked as reserved for any name. More... | |
Friends | |
class | GlobalNameResolver |
This class keeps track of global names at the module/interface level.
It is built in a global pass over the entire design and then frozen to allow concurrent accesses.
Definition at line 43 of file ExportVerilogInternals.h.
|
default |
|
inlineprivate |
Definition at line 66 of file ExportVerilogInternals.h.
|
privatedelete |
|
inlineprivate |
Definition at line 70 of file ExportVerilogInternals.h.
References circt::calyx::direction::get(), and renamedParams.
Referenced by circt::ExportVerilog::GlobalNameResolver::legalizeModuleNames().
void GlobalNameTable::addReservedNames | ( | NameCollisionResolver & | nameResolver | ) | const |
Definition at line 31 of file LegalizeNames.cpp.
References circt::ExportVerilog::NameCollisionResolver::insertUsedName().
Referenced by legalizeModuleLocalNames().
|
inline |
Definition at line 56 of file ExportVerilogInternals.h.
References enumPrefixes.
|
inline |
Return the string to use for the specified parameter name in the specified module.
Parameters may be renamed for a variety of reasons (e.g. conflicting with ports or Verilog keywords), and this returns the legalized name to use.
Definition at line 50 of file ExportVerilogInternals.h.
References renamedParams.
Referenced by legalizeModuleLocalNames().
|
privatedelete |
|
friend |
Definition at line 65 of file ExportVerilogInternals.h.
|
private |
Definition at line 82 of file ExportVerilogInternals.h.
Referenced by circt::ExportVerilog::GlobalNameResolver::gatherEnumPrefixes(), and getEnumPrefix().
|
private |
This contains entries for any parameters that got renamed.
The key is a moduleop/paramName tuple, the value is the name to use.
Definition at line 78 of file ExportVerilogInternals.h.
Referenced by addRenamedParam(), and getParameterVerilogName().
|
private |
List of names which are marked as reserved for any name.
Definition at line 85 of file ExportVerilogInternals.h.
Referenced by circt::ExportVerilog::GlobalNameResolver::GlobalNameResolver().