diff --git a/include/verilated_fst_c.h b/include/verilated_fst_c.h index 64efe75c1..232905eea 100644 --- a/include/verilated_fst_c.h +++ b/include/verilated_fst_c.h @@ -43,12 +43,9 @@ private: //========================================================================= // FST specific internals - typedef std::map Code2SymbolType; - typedef std::map Local2FstDtype; - void* m_fst; - Code2SymbolType m_code2symbol; - Local2FstDtype m_local2fstdtype; + std::map m_code2symbol; + std::map m_local2fstdtype; std::list m_curScope; fstHandle* m_symbolp = nullptr; ///< same as m_code2symbol, but as an array char* m_strbuf = nullptr; ///< String buffer long enough to hold maxBits() chars diff --git a/include/verilated_threads.h b/include/verilated_threads.h index ded328b5b..c7ddc4467 100644 --- a/include/verilated_threads.h +++ b/include/verilated_threads.h @@ -252,7 +252,6 @@ public: class VlThreadPool final { // TYPES typedef std::vector ProfileTrace; - typedef std::set ProfileSet; // MEMBERS std::vector m_workers; // our workers @@ -266,7 +265,7 @@ class VlThreadPool final { // this is the only cost we pay in real-time during a profiling cycle. // Internal note: Globals may multi-construct, see verilated.cpp top. static VL_THREAD_LOCAL ProfileTrace* t_profilep; - ProfileSet m_allProfiles VL_GUARDED_BY(m_mutex); + std::set m_allProfiles VL_GUARDED_BY(m_mutex); VerilatedMutex m_mutex; public: diff --git a/include/verilated_vpi.cpp b/include/verilated_vpi.cpp index 64b16fb83..2a9afdaeb 100644 --- a/include/verilated_vpi.cpp +++ b/include/verilated_vpi.cpp @@ -607,8 +607,7 @@ public: assertOneCheck(); VpioCbList& cbObjList = s().m_cbObjLists[cbValueChange]; bool called = false; - typedef std::unordered_set VpioVarSet; - VpioVarSet update; // set of objects to update after callbacks + std::unordered_set update; // set of objects to update after callbacks if (cbObjList.empty()) return called; const auto last = std::prev(cbObjList.end()); // prevent looping over newly added elements for (auto it = cbObjList.begin(); true;) { diff --git a/src/V3Active.cpp b/src/V3Active.cpp index b918b7249..c90016af5 100644 --- a/src/V3Active.cpp +++ b/src/V3Active.cpp @@ -77,10 +77,8 @@ public: class LatchDetectGraph final : public V3Graph { protected: - typedef std::vector VarRefVec; - LatchDetectGraphVertex* m_curVertexp; // Current latch detection graph vertex - VarRefVec m_outputs; // Vector of lvalues encountered on this pass + std::vector m_outputs; // Vector of lvalues encountered on this pass VL_DEBUG_FUNC; // Declare debug() diff --git a/src/V3Branch.cpp b/src/V3Branch.cpp index b4e6a2bf5..30560fb8e 100644 --- a/src/V3Branch.cpp +++ b/src/V3Branch.cpp @@ -42,13 +42,10 @@ private: // AstFTask::user1() -> int. Number of references AstUser1InUse m_inuser1; - // TYPES - typedef std::vector CFuncVec; - // STATE int m_likely; // Excuses for branch likely taken int m_unlikely; // Excuses for branch likely not taken - CFuncVec m_cfuncsp; // List of all tasks + std::vector m_cfuncsp; // List of all tasks // METHODS VL_DEBUG_FUNC; // Declare debug() diff --git a/src/V3Cdc.cpp b/src/V3Cdc.cpp index 9139c5eb5..29e3114b0 100644 --- a/src/V3Cdc.cpp +++ b/src/V3Cdc.cpp @@ -556,8 +556,7 @@ private: return; } // Fully computed - typedef std::set SenSet; - SenSet senouts; // List of all sensitivities for new signal + std::set senouts; // List of all sensitivities for new signal if (CdcLogicVertex* vvertexp = dynamic_cast(vertexp)) { if (vvertexp) {} // Unused } else if (CdcVarVertex* vvertexp = dynamic_cast(vertexp)) { diff --git a/src/V3Class.cpp b/src/V3Class.cpp index 7556bd19c..7c3b65bc7 100644 --- a/src/V3Class.cpp +++ b/src/V3Class.cpp @@ -37,8 +37,7 @@ private: AstScope* m_classScopep = nullptr; // Package moving scopes into AstScope* m_packageScopep = nullptr; // Class package scope AstNodeFTask* m_ftaskp = nullptr; // Current task - typedef std::vector> MoveVector; - MoveVector m_moves; + std::vector> m_moves; // NODE STATE // AstClass::user1() -> bool. True if iterated already diff --git a/src/V3Combine.cpp b/src/V3Combine.cpp index 687f8d602..f74364a4b 100644 --- a/src/V3Combine.cpp +++ b/src/V3Combine.cpp @@ -79,7 +79,7 @@ public: UINFO(4, " Remove " << oldfuncp << endl); } // Note: m_callMmap modified in loop, so not using equal_range. - for (CallMmap::iterator it = m_callMmap.find(oldfuncp); it != m_callMmap.end(); + for (auto it = m_callMmap.find(oldfuncp); it != m_callMmap.end(); it = m_callMmap.find(oldfuncp)) { AstCCall* callp = it->second; if (!callp->user3()) { // !already done @@ -173,7 +173,7 @@ private: // AstUser4InUse part of V3Hashed // STATE - typedef enum : uint8_t { STATE_IDLE, STATE_HASH, STATE_DUP } CombineState; + enum CombineState : uint8_t { STATE_IDLE, STATE_HASH, STATE_DUP }; VDouble0 m_statCombs; // Statistic tracking CombineState m_state = STATE_IDLE; // Major state AstNodeModule* m_modp = nullptr; // Current module diff --git a/src/V3Config.cpp b/src/V3Config.cpp index 40b7985d7..93b4ebecf 100644 --- a/src/V3Config.cpp +++ b/src/V3Config.cpp @@ -154,13 +154,10 @@ typedef V3ConfigWildcardResolver V3ConfigFTaskResolver; // Modules have tasks, variables, named blocks and properties class V3ConfigModule final { - typedef std::unordered_set StringSet; - typedef std::set PragmaSet; - V3ConfigFTaskResolver m_tasks; // Functions/tasks in module V3ConfigVarResolver m_vars; // Variables in module - StringSet m_coverageOffBlocks; // List of block names for coverage_off - PragmaSet m_modPragmas; // List of Pragmas for modules + std::unordered_set m_coverageOffBlocks; // List of block names for coverage_off + std::set m_modPragmas; // List of Pragmas for modules bool m_inline = false; // Whether to force the inline bool m_inlineValue = false; // The inline value (on/off) @@ -175,8 +172,7 @@ public: m_inline = m.m_inline; m_inlineValue = m.m_inlineValue; } - for (PragmaSet::const_iterator it = m.m_modPragmas.begin(); it != m.m_modPragmas.end(); - ++it) { + for (auto it = m.m_modPragmas.cbegin(); it != m.m_modPragmas.cend(); ++it) { m_modPragmas.insert(*it); } } @@ -198,7 +194,7 @@ public: AstNode* nodep = new AstPragma(modp->fileline(), type); modp->addStmtp(nodep); } - for (PragmaSet::const_iterator it = m_modPragmas.begin(); it != m_modPragmas.end(); ++it) { + for (auto it = m_modPragmas.cbegin(); it != m_modPragmas.cend(); ++it) { AstNode* nodep = new AstPragma(modp->fileline(), *it); modp->addStmtp(nodep); } diff --git a/src/V3Coverage.cpp b/src/V3Coverage.cpp index 161839acf..7ad84e8cb 100644 --- a/src/V3Coverage.cpp +++ b/src/V3Coverage.cpp @@ -40,9 +40,7 @@ class CoverageVisitor final : public AstNVisitor { private: // TYPES - typedef std::unordered_map VarNameMap; typedef std::set LinenoSet; - typedef std::unordered_map HandleLines; struct ToggleEnt { string m_comment; // Comment for coverage dump @@ -81,9 +79,10 @@ private: CheckState m_state; // State save-restored on each new coverage scope/block AstNodeModule* m_modp = nullptr; // Current module to add statement to bool m_inToggleOff = false; // In function/task etc - VarNameMap m_varnames; // Uniquification of inserted variable names + std::unordered_map m_varnames; // Uniquification of inserted variable names string m_beginHier; // AstBegin hier name for user coverage points - HandleLines m_handleLines; // All line numbers for a given m_stateHandle + std::unordered_map + m_handleLines; // All line numbers for a given m_stateHandle // METHODS VL_DEBUG_FUNC; // Declare debug() diff --git a/src/V3CoverageJoin.cpp b/src/V3CoverageJoin.cpp index 7d382d59c..48cf67fad 100644 --- a/src/V3CoverageJoin.cpp +++ b/src/V3CoverageJoin.cpp @@ -38,11 +38,8 @@ private: // AstUser4InUse In V3Hashed - // TYPES - typedef std::vector ToggleList; - // STATE - ToggleList m_toggleps; // List of of all AstCoverToggle's + std::vector m_toggleps; // List of of all AstCoverToggle's VDouble0 m_statToggleJoins; // Statistic tracking diff --git a/src/V3Delayed.cpp b/src/V3Delayed.cpp index 283b30923..553f38d59 100644 --- a/src/V3Delayed.cpp +++ b/src/V3Delayed.cpp @@ -97,8 +97,7 @@ private: typedef std::map, AstVar*> VarMap; VarMap m_modVarMap; // Table of new var names created under module VDouble0 m_statSharedSet; // Statistic tracking - typedef std::unordered_map ScopeVecMap; - ScopeVecMap m_scopeVecMap; // Next var number for each scope + std::unordered_map m_scopeVecMap; // Next var number for each scope // METHODS VL_DEBUG_FUNC; // Declare debug() diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index c82d39dec..95942d878 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -77,14 +77,14 @@ public: char fmtLetter); void emitVarDecl(const AstVar* nodep, const string& prefixIfImp); - typedef enum : uint8_t { + enum EisWhich : uint8_t { EVL_CLASS_IO, EVL_CLASS_SIG, EVL_CLASS_TEMP, EVL_CLASS_PAR, EVL_CLASS_ALL, EVL_FUNC_ALL - } EisWhich; + }; void emitVarList(AstNode* firstp, EisWhich which, const string& prefixIfImp, string& sectionr); static void emitVarSort(const VarSortMap& vmap, VarVec* sortedp); void emitSortedVarList(const VarVec& anons, const VarVec& nonanons, const string& prefixIfImp); @@ -221,8 +221,7 @@ public: } }; void emitIntFuncDecls(AstNodeModule* modp, bool methodFuncs) { - typedef std::vector FuncVec; - FuncVec funcsp; + std::vector funcsp; for (AstNode* nodep = modp->stmtsp(); nodep; nodep = nodep->nextp()) { if (const AstCFunc* funcp = VN_CAST(nodep, CFunc)) { diff --git a/src/V3EmitCSyms.cpp b/src/V3EmitCSyms.cpp index 352b3292b..d0cfe9632 100644 --- a/src/V3EmitCSyms.cpp +++ b/src/V3EmitCSyms.cpp @@ -71,8 +71,6 @@ class EmitCSyms final : EmitCBaseVisitor { , m_modp{modp} , m_scopep{scopep} {} }; - typedef std::map ScopeFuncs; - typedef std::map ScopeVars; typedef std::map ScopeNames; typedef std::pair ScopeModPair; typedef std::pair ModVarPair; @@ -100,8 +98,8 @@ class EmitCSyms final : EmitCBaseVisitor { std::vector m_dpis; // DPI functions std::vector m_modVars; // Each public {mod,var} ScopeNames m_scopeNames; // Each unique AstScopeName - ScopeFuncs m_scopeFuncs; // Each {scope,dpi-export-func} - ScopeVars m_scopeVars; // Each {scope,public-var} + std::map m_scopeFuncs; // Each {scope,dpi-export-func} + std::map m_scopeVars; // Each {scope,public-var} ScopeNames m_vpiScopeCandidates; // All scopes for VPI ScopeNameHierarchy m_vpiScopeHierarchy; // The actual hierarchy of scopes int m_coverBins = 0; // Coverage bin number @@ -572,8 +570,7 @@ void EmitCSyms::emitScopeHier(bool destroy) { } } - for (ScopeNameHierarchy::const_iterator it = m_vpiScopeHierarchy.begin(); - it != m_vpiScopeHierarchy.end(); ++it) { + for (auto it = m_vpiScopeHierarchy.cbegin(); it != m_vpiScopeHierarchy.cend(); ++it) { for (ScopeNameList::const_iterator lit = it->second.begin(); lit != it->second.end(); ++lit) { string fromname = scopeSymString(it->first); @@ -734,7 +731,7 @@ void EmitCSyms::emitSymImp() { if (v3Global.dpi()) { m_ofpBase->puts("// Setup export functions\n"); m_ofpBase->puts("for (int __Vfinal=0; __Vfinal<2; __Vfinal++) {\n"); - for (ScopeFuncs::iterator it = m_scopeFuncs.begin(); it != m_scopeFuncs.end(); ++it) { + for (auto it = m_scopeFuncs.begin(); it != m_scopeFuncs.end(); ++it) { AstScopeName* scopep = it->second.m_scopep; AstCFunc* funcp = it->second.m_cfuncp; AstNodeModule* modp = it->second.m_modp; @@ -752,7 +749,7 @@ void EmitCSyms::emitSymImp() { } // It would be less code if each module inserted its own variables. // Someday. For now public isn't common. - for (ScopeVars::iterator it = m_scopeVars.begin(); it != m_scopeVars.end(); ++it) { + for (auto it = m_scopeVars.begin(); it != m_scopeVars.end(); ++it) { checkSplit(true); AstNodeModule* modp = it->second.m_modp; AstScope* scopep = it->second.m_scopep; diff --git a/src/V3File.cpp b/src/V3File.cpp index fbcd02eac..9edea35ea 100644 --- a/src/V3File.cpp +++ b/src/V3File.cpp @@ -328,10 +328,9 @@ void V3File::createMakeDir() { // VInFilterImp class VInFilterImp final { - typedef std::map FileContentsMap; typedef VInFilter::StrList StrList; - FileContentsMap m_contentsMap; // Cache of file contents + std::map m_contentsMap; // Cache of file contents bool m_readEof = false; // Received EOF on read #ifdef INFILTER_PIPE pid_t m_pid = 0; // fork() process id @@ -949,10 +948,8 @@ void V3OutCFile::putsGuard() { class VIdProtectImp final { // MEMBERS - typedef std::map IdMap; - IdMap m_nameMap; // Map of old name into new name - typedef std::unordered_set IdSet; - IdSet m_newIdSet; // Which new names exist + std::map m_nameMap; // Map of old name into new name + std::unordered_set m_newIdSet; // Which new names exist protected: // CONSTRUCTORS friend class VIdProtect; diff --git a/src/V3FileLine.cpp b/src/V3FileLine.cpp index 6f8f5073b..5c5449ed2 100644 --- a/src/V3FileLine.cpp +++ b/src/V3FileLine.cpp @@ -71,7 +71,7 @@ int FileLineSingleton::nameToNumber(const string& filename) { //! Experimental. Updated to also put out the language. void FileLineSingleton::fileNameNumMapDumpXml(std::ostream& os) { os << "\n"; - for (FileNameNumMap::const_iterator it = m_namemap.begin(); it != m_namemap.end(); ++it) { + for (auto it = m_namemap.cbegin(); it != m_namemap.cend(); ++it) { os << "second) << "\" filename=\"" << V3OutFormatter::quoteNameControls(it->first, V3OutFormatter::LA_XML) << "\" language=\"" << numberToLang(it->second).ascii() << "\"/>\n"; @@ -427,8 +427,7 @@ string FileLine::warnContext(bool secondary) const { } #ifdef VL_LEAK_CHECKS -typedef std::unordered_set FileLineCheckSet; -FileLineCheckSet fileLineLeakChecks; +std::unordered_set fileLineLeakChecks; void* FileLine::operator new(size_t size) { FileLine* objp = static_cast(::operator new(size)); diff --git a/src/V3FileLine.h b/src/V3FileLine.h index 983554aaf..fa77fdafa 100644 --- a/src/V3FileLine.h +++ b/src/V3FileLine.h @@ -38,10 +38,8 @@ class FileLine; //! This singleton class contains tables of data that are unchanging in each //! source file (each with its own unique filename number). class FileLineSingleton final { - // TYPES - typedef std::map FileNameNumMap; // MEMBERS - FileNameNumMap m_namemap; // filenameno for each filename + std::map m_namemap; // filenameno for each filename std::deque m_names; // filename text for each filenameno std::deque m_languages; // language for each filenameno // CONSTRUCTORS diff --git a/src/V3Gate.cpp b/src/V3Gate.cpp index 3c1a92e9e..cb329f785 100644 --- a/src/V3Gate.cpp +++ b/src/V3Gate.cpp @@ -681,9 +681,9 @@ bool GateVisitor::elimLogicOkOutputs(GateLogicVertex* consumeVertexp, // Return true if can optimize // Return false if the consuming logic has an output signal that the // replacement logic has as an input - typedef std::unordered_set VarScopeSet; + // Use map to find duplicates between two lists - VarScopeSet varscopes; + std::unordered_set varscopes; // Replacement logic usually has shorter input list, so faster to build list based on it const GateVarRefList& rhsVarRefs = okVisitor.rhsVarRefs(); for (GateVarRefList::const_iterator it = rhsVarRefs.begin(); it != rhsVarRefs.end(); ++it) { @@ -901,10 +901,6 @@ void GateVisitor::optimizeElimVar(AstVarScope* varscp, AstNode* substp, AstNode* // Auxiliary hash class for GateDedupeVarVisitor class GateDedupeHash final : public V3HashedUserSame { -public: - // TYPES - typedef std::unordered_set NodeSet; - private: // NODE STATE // Ast*::user2p -> parent AstNodeAssign* for this rhsp @@ -919,7 +915,7 @@ private: AstUser5InUse m_inuser5; V3Hashed m_hashed; // Hash, contains rhs of assigns - NodeSet m_nodeDeleteds; // Any node in this hash was deleted + std::unordered_set m_nodeDeleteds; // Any node in this hash was deleted VL_DEBUG_FUNC; // Declare debug() diff --git a/src/V3Global.h b/src/V3Global.h index 693b213a3..8ec6ba819 100644 --- a/src/V3Global.h +++ b/src/V3Global.h @@ -105,8 +105,8 @@ class V3Global final { bool m_useRandomizeMethods = false; // Need to define randomize() class methods // Memory address to short string mapping (for debug) - typedef std::unordered_map PtrToIdMap; // The map type - PtrToIdMap m_ptrToId; // The actual 'address' <=> 'short string' bijection + std::unordered_map + m_ptrToId; // The actual 'address' <=> 'short string' bijection public: // Options diff --git a/src/V3Graph.cpp b/src/V3Graph.cpp index c4e28599d..2f6481943 100644 --- a/src/V3Graph.cpp +++ b/src/V3Graph.cpp @@ -325,8 +325,7 @@ void V3Graph::dumpDotFile(const string& filename, bool colorAsSubgraph) const { *logp << "\t\t rankdir=" << dotRankDir() << "];\n"; // List of all possible subgraphs - typedef std::multimap SubgraphMmap; - SubgraphMmap subgraphs; + std::multimap subgraphs; for (V3GraphVertex* vertexp = verticesBeginp(); vertexp; vertexp = vertexp->verticesNextp()) { string vertexSubgraph = (colorAsSubgraph && vertexp->color()) ? cvtToStr(vertexp->color()) : ""; @@ -340,7 +339,7 @@ void V3Graph::dumpDotFile(const string& filename, bool colorAsSubgraph) const { // Print vertices int n = 0; string subgr; - for (SubgraphMmap::const_iterator it = subgraphs.begin(); it != subgraphs.end(); ++it) { + for (auto it = subgraphs.cbegin(); it != subgraphs.cend(); ++it) { string vertexSubgraph = it->first; V3GraphVertex* vertexp = it->second; numMap[vertexp] = n; diff --git a/src/V3GraphDfa.cpp b/src/V3GraphDfa.cpp index 555c19d94..135187e3e 100644 --- a/src/V3GraphDfa.cpp +++ b/src/V3GraphDfa.cpp @@ -177,7 +177,7 @@ private: uint32_t hash = hashDfaOrigins(nfasWithInput); const auto eqrange = m_hashMap.equal_range(hash); - for (HashMap::iterator it = eqrange.first; it != eqrange.second; ++it) { + for (auto it = eqrange.first; it != eqrange.second; ++it) { DfaVertex* testp = it->second; if (compareDfaOrigins(nfasWithInput, testp)) { UINFO(9, " DFA match for set: " << testp << endl); diff --git a/src/V3GraphStream.h b/src/V3GraphStream.h index 84c6c3eec..4f62b50eb 100644 --- a/src/V3GraphStream.h +++ b/src/V3GraphStream.h @@ -81,12 +81,11 @@ private: }; typedef std::set ReadyVertices; - typedef std::map WaitingVertices; // MEMBERS VxHolderCmp m_vxHolderCmp; // Vertext comparison functor ReadyVertices m_readyVertices; // List of ready vertices - WaitingVertices m_waitingVertices; // List of waiting vertices + std::map m_waitingVertices; // List of waiting vertices typename ReadyVertices::iterator m_last; // Previously returned element GraphWay m_way; // FORWARD or REVERSE order of traversal diff --git a/src/V3HierBlock.h b/src/V3HierBlock.h index 7a7044b25..38caf5b8f 100644 --- a/src/V3HierBlock.h +++ b/src/V3HierBlock.h @@ -42,7 +42,6 @@ class V3HierBlock final { public: typedef std::vector GParams; typedef std::unordered_set HierBlockSet; - typedef std::unordered_set NodeModuleSet; private: // TYPES diff --git a/src/V3Inline.cpp b/src/V3Inline.cpp index e1ba954db..d4c57a51a 100644 --- a/src/V3Inline.cpp +++ b/src/V3Inline.cpp @@ -264,14 +264,12 @@ public: class InlineRelinkVisitor final : public AstNVisitor { private: - typedef std::unordered_set StringSet; - // NODE STATE // Input: // See InlineVisitor // STATE - StringSet m_renamedInterfaces; // Name of renamed interface variables + std::unordered_set m_renamedInterfaces; // Name of renamed interface variables AstNodeModule* m_modp; // Current module AstCell* m_cellp; // Cell being cloned diff --git a/src/V3Inst.cpp b/src/V3Inst.cpp index fb4d3625d..bbc466e0e 100644 --- a/src/V3Inst.cpp +++ b/src/V3Inst.cpp @@ -141,8 +141,7 @@ class InstDeModVarVisitor final : public AstNVisitor { // Expand all module variables, and save names for later reference private: // STATE - typedef std::map VarNameMap; - VarNameMap m_modVarNameMap; // Per module, name of cloned variables + std::map m_modVarNameMap; // Per module, name of cloned variables VL_DEBUG_FUNC; // Declare debug() diff --git a/src/V3LifePost.cpp b/src/V3LifePost.cpp index c578335c7..9aea9b950 100644 --- a/src/V3LifePost.cpp +++ b/src/V3LifePost.cpp @@ -150,8 +150,7 @@ private: LocMap m_writes; // VarScope write locations // Map each dly var to its AstAssignPost* node and the location thereof - typedef std::unordered_map PostLocMap; - PostLocMap m_assignposts; // AssignPost dly var locations + std::unordered_map m_assignposts; const V3Graph* m_mtasksGraphp = nullptr; // Mtask tracking graph std::unique_ptr m_checker; diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index e4be8719b..7a536434f 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -140,10 +140,7 @@ public: private: // TYPES - typedef std::multimap NameScopeSymMap; typedef std::unordered_map ScopeAliasMap; - typedef std::set> ImplicitNameSet; - typedef std::vector IfaceVarSyms; typedef std::vector> IfaceModSyms; static LinkDotState* s_errorThisp; // Last self, for error reporting only @@ -151,10 +148,12 @@ private: // MEMBERS VSymGraph m_syms; // Symbol table VSymEnt* m_dunitEntp; // $unit entry - NameScopeSymMap m_nameScopeSymMap; // Map of scope referenced by non-pretty textual name - ImplicitNameSet m_implicitNameSet; // For [module][signalname] if we can implicitly create it + std::multimap + m_nameScopeSymMap; // Map of scope referenced by non-pretty textual name + std::set> + m_implicitNameSet; // For [module][signalname] if we can implicitly create it std::array m_scopeAliasMap; // Map of aliases - IfaceVarSyms m_ifaceVarSyms; // List of AstIfaceRefDType's to be imported + std::vector m_ifaceVarSyms; // List of AstIfaceRefDType's to be imported IfaceModSyms m_ifaceModSyms; // List of AstIface+Symbols to be processed bool m_forPrimary; // First link bool m_forPrearray; // Compress cell__[array] refs diff --git a/src/V3LinkJump.cpp b/src/V3LinkJump.cpp index 8308ffa1b..8a9547c3b 100644 --- a/src/V3LinkJump.cpp +++ b/src/V3LinkJump.cpp @@ -43,9 +43,6 @@ class LinkJumpVisitor final : public AstNVisitor { private: - // TYPES - typedef std::vector BlockStack; - // STATE AstNodeModule* m_modp = nullptr; // Current module AstNodeFTask* m_ftaskp = nullptr; // Current function/task @@ -53,7 +50,7 @@ private: bool m_loopInc = false; // In loop increment bool m_inFork = false; // Under fork int m_modRepeatNum = 0; // Repeat counter - BlockStack m_blockStack; // All begin blocks above current node + std::vector m_blockStack; // All begin blocks above current node // METHODS VL_DEBUG_FUNC; // Declare debug() diff --git a/src/V3LinkParse.cpp b/src/V3LinkParse.cpp index 60c73a5e5..e5913888f 100644 --- a/src/V3LinkParse.cpp +++ b/src/V3LinkParse.cpp @@ -45,12 +45,11 @@ private: // TYPES typedef std::map, AstTypedef*> ImplTypedefMap; - typedef std::unordered_set FileLineSet; // STATE AstVar* m_varp = nullptr; // Variable we're under ImplTypedefMap m_implTypedef; // Created typedefs for each - FileLineSet m_filelines; // Filelines that have been seen + std::unordered_set m_filelines; // Filelines that have been seen bool m_inAlways = false; // Inside an always AstNodeModule* m_valueModp = nullptr; // If set, move AstVar->valuep() initial values to this module diff --git a/src/V3Order.cpp b/src/V3Order.cpp index 4612cf44b..464f219c5 100644 --- a/src/V3Order.cpp +++ b/src/V3Order.cpp @@ -422,9 +422,6 @@ template class ProcessMoveBuildGraph { // TYPES typedef std::pair VxDomPair; - // Maps an (original graph vertex, domain) pair to a T_MoveVertex - // Not std::unordered_map, because std::pair doesn't provide std::hash - typedef std::map Var2Move; typedef std::unordered_map Logic2Move; public: @@ -446,7 +443,9 @@ private: V3Graph* m_outGraphp; // Output graph of T_MoveVertex's MoveVertexMaker* m_vxMakerp; // Factory class for T_MoveVertex's Logic2Move m_logic2move; // Map Logic to Vertex - Var2Move m_var2move; // Map Vars to Vertex + // Maps an (original graph vertex, domain) pair to a T_MoveVertex + // Not std::unordered_map, because std::pair doesn't provide std::hash + std::map m_var2move; public: // CONSTRUCTORS @@ -752,14 +751,13 @@ private: // processMTask* routines schedule threaded execution struct MTaskState { - typedef std::list Logics; AstMTaskBody* m_mtaskBodyp = nullptr; - Logics m_logics; + std::list m_logics; ExecMTask* m_execMTaskp = nullptr; MTaskState() = default; }; void processMTasks(); - typedef enum : uint8_t { LOGIC_INITIAL, LOGIC_SETTLE } InitialLogicE; + enum InitialLogicE : uint8_t { LOGIC_INITIAL, LOGIC_SETTLE }; void processMTasksInitial(InitialLogicE logic_type); string cfuncName(AstNodeModule* modp, AstSenTree* domainp, AstScope* scopep, diff --git a/src/V3OrderGraph.h b/src/V3OrderGraph.h index 69051b511..56e44bc99 100644 --- a/src/V3OrderGraph.h +++ b/src/V3OrderGraph.h @@ -300,7 +300,7 @@ public: //--- Following only under the move graph, not the main graph class OrderMoveVertex final : public V3GraphVertex { - typedef enum : uint8_t { POM_WAIT, POM_READY, POM_MOVED } OrderMState; + enum OrderMState : uint8_t { POM_WAIT, POM_READY, POM_MOVED }; OrderLogicVertex* m_logicp; OrderMState m_state; // Movement state diff --git a/src/V3Param.cpp b/src/V3Param.cpp index 89df4b371..a067f2c35 100644 --- a/src/V3Param.cpp +++ b/src/V3Param.cpp @@ -72,8 +72,6 @@ class ParameterizedHierBlocks final { typedef std::map HierBlockModMap; typedef std::map> ParamConstMap; typedef std::map GParamsMap; // key:parameter name value:parameter - typedef std::map HierParamsMap; - typedef std::map ModParamsMap; // key:module name // MEMBERS // key:Original module name, value:HiearchyBlockOption* @@ -83,8 +81,9 @@ class ParameterizedHierBlocks final { // key:mangled module name, value:AstNodeModule* HierBlockModMap m_hierBlockMod; // Overridden parameters of the hierarchical block - HierParamsMap m_hierParams; - ModParamsMap m_modParams; // Parameter variables of hierarchical blocks + std::map m_hierParams; + std::map + m_modParams; // Parameter variables of hierarchical blocks // METHODS VL_DEBUG_FUNC; // Declare debug() @@ -243,11 +242,10 @@ class ParamProcessor final { explicit ModInfo(AstNodeModule* modp) : m_modp{modp} {} }; - typedef std::map ModNameMap; - ModNameMap m_modNameMap; // Hash of created module flavors by name + std::map m_modNameMap; // Hash of created module flavors by name - typedef std::map LongMap; - LongMap m_longMap; // Hash of very long names to unique identity number + std::map + m_longMap; // Hash of very long names to unique identity number int m_longId = 0; // All module names that are loaded from source code @@ -255,8 +253,7 @@ class ParamProcessor final { V3StringSet m_allModuleNames; typedef std::pair ValueMapValue; - typedef std::map ValueMap; - ValueMap m_valueMap; // Hash of node hash to (param value, name) + std::map m_valueMap; // Hash of node hash to (param value, name) int m_nextValue = 1; // Next value to use in m_valueMap AstNodeModule* m_modp = nullptr; // Current module being processed @@ -821,8 +818,7 @@ class ParamVisitor final : public AstNVisitor { string m_unlinkedTxt; // Text for AstUnlinkedRef std::deque m_cellps; // Cells left to process (in this module) - typedef std::multimap LevelModMap; - LevelModMap m_todoModps; // Modules left to process + std::multimap m_todoModps; // Modules left to process // METHODS VL_DEBUG_FUNC; // Declare debug() diff --git a/src/V3ParseImp.h b/src/V3ParseImp.h index d556d628e..a9477921c 100644 --- a/src/V3ParseImp.h +++ b/src/V3ParseImp.h @@ -37,9 +37,9 @@ class V3Lexer; //====================================================================== // Types (between parser & lexer) -typedef enum : uint8_t { uniq_NONE, uniq_UNIQUE, uniq_UNIQUE0, uniq_PRIORITY } V3UniqState; +enum V3UniqState : uint8_t { uniq_NONE, uniq_UNIQUE, uniq_UNIQUE0, uniq_PRIORITY }; -typedef enum : uint8_t { iprop_NONE, iprop_CONTEXT, iprop_PURE } V3ImportProperty; +enum V3ImportProperty : uint8_t { iprop_NONE, iprop_CONTEXT, iprop_PURE }; //============================================================================ // Member qualifiers diff --git a/src/V3ParseSym.h b/src/V3ParseSym.h index 8c8361c03..17ab5de56 100644 --- a/src/V3ParseSym.h +++ b/src/V3ParseSym.h @@ -40,7 +40,7 @@ private: VSymGraph m_syms; // Graph of symbol tree VSymEnt* m_symTableNextId = nullptr; // Symbol table for next lexer lookup (parser use only) VSymEnt* m_symCurrentp; // Active symbol table for additions/lookups - SymStack m_sympStack; // Stack of upper nodes with pending symbol tables + std::vector m_sympStack; // Stack of upper nodes with pending symbol tables public: // CONSTRUCTORS diff --git a/src/V3Partition.cpp b/src/V3Partition.cpp index d8a2c6e5b..fe3e761f0 100644 --- a/src/V3Partition.cpp +++ b/src/V3Partition.cpp @@ -166,8 +166,7 @@ private: vluint64_t m_generation = 0; // Mark each vertex with this number; // // confirm we only process each vertex once. bool m_slowAsserts; // Enable nontrivial asserts - typedef SortByValueMap PropCpPendSet; - PropCpPendSet m_pending; // Pending rescores + SortByValueMap m_pending; // Pending rescores public: // CONSTRUCTORS @@ -2040,8 +2039,7 @@ private: ReadyMTasks m_ready; // MTasks ready to be assigned next; all their // // dependencies are already assigned. - typedef std::vector MTaskVec; - MTaskVec m_prevMTask; // Previous mtask scheduled to each thread. + std::vector m_prevMTask; // Previous mtask scheduled to each thread. std::vector m_busyUntil; // Time each thread is occupied until public: @@ -2458,7 +2456,7 @@ void V3Partition::go(V3Graph* mtasksp) { sorted.insert(mtaskp); } uint32_t nextId = 1; - for (SortedMTaskSet::iterator it = sorted.begin(); it != sorted.end(); ++it) { + for (auto it = sorted.begin(); it != sorted.end(); ++it) { // We shouldn't perturb the sort order of the set, despite // changing the IDs, they should all just remain in the same // relative order. Confirm that: diff --git a/src/V3Partition.h b/src/V3Partition.h index 3405f1b7f..f8fc86b10 100644 --- a/src/V3Partition.h +++ b/src/V3Partition.h @@ -76,10 +76,9 @@ private: class PartPtrIdMap final { private: // TYPES - typedef std::unordered_map PtrMap; // MEMBERS mutable vluint64_t m_nextId = 0; - mutable PtrMap m_id; + mutable std::unordered_map m_id; public: // CONSTRUCTORS diff --git a/src/V3Reloop.cpp b/src/V3Reloop.cpp index 5fb63111e..d9b6aeabc 100644 --- a/src/V3Reloop.cpp +++ b/src/V3Reloop.cpp @@ -45,9 +45,6 @@ constexpr unsigned RELOOP_MIN_ITERS = 40; // Need at least this many loops to d class ReloopVisitor final : public AstNVisitor { private: - // TYPES - typedef std::vector AssVec; - // NODE STATE // AstCFunc::user1p -> Var* for temp var, 0=not set yet AstUser1InUse m_inuser1; @@ -57,7 +54,7 @@ private: VDouble0 m_statReItems; // Statistic tracking AstCFunc* m_cfuncp = nullptr; // Current block - AssVec m_mgAssignps; // List of assignments merging + std::vector m_mgAssignps; // List of assignments merging AstCFunc* m_mgCfuncp = nullptr; // Parent C function AstNode* m_mgNextp = nullptr; // Next node AstNodeSel* m_mgSelLp = nullptr; // Parent select, nullptr = idle diff --git a/src/V3Scope.cpp b/src/V3Scope.cpp index 042181ff8..c7188841f 100644 --- a/src/V3Scope.cpp +++ b/src/V3Scope.cpp @@ -45,10 +45,8 @@ private: AstUser2InUse m_inuser2; // TYPES - typedef std::unordered_map PackageScopeMap; // These cannot be unordered unless make a specialized hashing pair (gcc-8) typedef std::map, AstVarScope*> VarScopeMap; - typedef std::set> VarRefScopeSet; // STATE, inside processing a single module AstNodeModule* m_modp = nullptr; // Current module @@ -57,9 +55,10 @@ private: AstCell* m_aboveCellp = nullptr; // Cell that instantiates this module AstScope* m_aboveScopep = nullptr; // Scope that instantiates this scope - PackageScopeMap m_packageScopes; // Scopes for each package + std::unordered_map m_packageScopes; // Scopes for each package VarScopeMap m_varScopes; // Varscopes created for each scope and var - VarRefScopeSet m_varRefScopes; // Varrefs-in-scopes needing fixup when done + std::set> + m_varRefScopes; // Varrefs-in-scopes needing fixup when done // METHODS VL_DEBUG_FUNC; // Declare debug() diff --git a/src/V3Scoreboard.h b/src/V3Scoreboard.h index f0370f59d..3584bf4a8 100644 --- a/src/V3Scoreboard.h +++ b/src/V3Scoreboard.h @@ -44,12 +44,11 @@ template Key2Val; typedef std::set KeySet; typedef std::map Val2Keys; // MEMBERS - Key2Val m_keys; // Map each key to its value. Not sorted. + std::unordered_map m_keys; // Map each key to its value. Not sorted. Val2Keys m_vals; // Map each value to its keys. Sorted. public: @@ -353,7 +352,6 @@ template NeedRescoreSet; class CmpElems final { public: bool operator()(const T_Elem* const& ap, const T_Elem* const& bp) const { @@ -365,7 +363,7 @@ private: typedef T_Score (*UserScoreFnp)(const T_Elem*); // MEMBERS - NeedRescoreSet m_unknown; // Elements with unknown scores + std::unordered_set m_unknown; // Elements with unknown scores SortedMap m_sorted; // Set of elements with known scores UserScoreFnp m_scoreFnp; // Scoring function bool m_slowAsserts; // Do some asserts that require extra lookups diff --git a/src/V3Split.cpp b/src/V3Split.cpp index 801a6cef7..af5b9921b 100644 --- a/src/V3Split.cpp +++ b/src/V3Split.cpp @@ -248,12 +248,9 @@ private: AstUser4InUse m_inuser4; protected: - // TYPES - typedef std::vector VStack; - // STATE string m_noReorderWhy; // Reason we can't reorder - VStack m_stmtStackps; // Current statements being tracked + std::vector m_stmtStackps; // Current statements being tracked SplitPliVertex* m_pliVertexp; // Element specifying PLI ordering V3Graph m_graph; // Scoreboard of var usages/dependencies bool m_inDly; // Inside ASSIGNDLY @@ -523,8 +520,7 @@ protected: // Reorder statements in the completed graph // Map the rank numbers into nodes they associate with - typedef std::multimap RankNodeMap; - RankNodeMap rankMap; + std::multimap rankMap; int currOrder = 0; // Existing sequence number of assignment for (AstNode* nextp = nodep; nextp; nextp = nextp->nextp()) { SplitLogicVertex* vvertexp = reinterpret_cast(nextp->user3p()); @@ -535,7 +531,7 @@ protected: // Is the current ordering OK? bool leaveAlone = true; int newOrder = 0; // New sequence number of assignment - for (RankNodeMap::const_iterator it = rankMap.begin(); it != rankMap.end(); ++it) { + for (auto it = rankMap.cbegin(); it != rankMap.cend(); ++it) { AstNode* nextp = it->second; if (++newOrder != nextp->user4()) leaveAlone = false; } @@ -544,7 +540,7 @@ protected: } else { AstNRelinker replaceHandle; // Where to add the list AstNode* newListp = nullptr; - for (RankNodeMap::const_iterator it = rankMap.begin(); it != rankMap.end(); ++it) { + for (auto it = rankMap.cbegin(); it != rankMap.cend(); ++it) { AstNode* nextp = it->second; UINFO(6, " New order: " << nextp << endl); if (nextp == nodep) { @@ -626,11 +622,10 @@ class IfColorVisitor final : public AstNVisitor { // MEMBERS ColorSet m_colors; // All colors in the original always block - typedef std::vector IfStack; - IfStack m_ifStack; // Stack of nested if-statements we're currently processing + std::vector m_ifStack; // Stack of nested if-statements we're currently processing - typedef std::unordered_map IfColorMap; - IfColorMap m_ifColors; // Map each if-statement to the set of colors (split blocks) + std::unordered_map + m_ifColors; // Map each if-statement to the set of colors (split blocks) // that will get a copy of that if-statement // CONSTRUCTORS @@ -657,7 +652,7 @@ private: UINFO(8, " SVL " << vertexp << " has color " << color << "\n"); // Record that all containing ifs have this color. - for (IfStack::const_iterator it = m_ifStack.begin(); it != m_ifStack.end(); ++it) { + for (auto it = m_ifStack.cbegin(); it != m_ifStack.cend(); ++it) { m_ifColors[*it].insert(color); } } @@ -686,8 +681,7 @@ class EmitSplitVisitor final : public AstNVisitor { const IfColorVisitor* m_ifColorp; // Digest of results of prior coloring // Map each color to our current place within the color's new always - typedef std::unordered_map LocMap; - LocMap m_addAfter; + std::unordered_map m_addAfter; AlwaysVec* m_newBlocksp; // Split always blocks we have generated @@ -794,8 +788,7 @@ private: }; class RemovePlaceholdersVisitor final : public AstNVisitor { - typedef std::unordered_set NodeSet; - NodeSet m_removeSet; // placeholders to be removed + std::unordered_set m_removeSet; // placeholders to be removed public: explicit RemovePlaceholdersVisitor(AstNode* nodep) { iterate(nodep); @@ -817,8 +810,7 @@ private: // Keys are original always blocks pending delete, // values are newly split always blocks pending insertion // at the same position as the originals: - typedef std::unordered_map ReplaceMap; - ReplaceMap m_replaceBlocks; + std::unordered_map m_replaceBlocks; // AstNodeIf* whose condition we're currently visiting AstNode* m_curIfConditional = nullptr; @@ -831,8 +823,7 @@ public: // Splice newly-split blocks into the tree. Remove placeholders // from newly-split blocks. Delete the original always blocks // that we're replacing. - for (ReplaceMap::iterator it = m_replaceBlocks.begin(); it != m_replaceBlocks.end(); - ++it) { + for (auto it = m_replaceBlocks.begin(); it != m_replaceBlocks.end(); ++it) { AstAlways* origp = it->first; for (AlwaysVec::iterator addme = it->second.begin(); addme != it->second.end(); ++addme) { @@ -851,7 +842,7 @@ protected: virtual void makeRvalueEdges(SplitVarStdVertex* vstdp) override { // Each 'if' depends on rvalues in its own conditional ONLY, // not rvalues in the if/else bodies. - for (VStack::const_iterator it = m_stmtStackps.begin(); it != m_stmtStackps.end(); ++it) { + for (auto it = m_stmtStackps.cbegin(); it != m_stmtStackps.cend(); ++it) { AstNodeIf* ifNodep = VN_CAST((*it)->nodep(), NodeIf); if (ifNodep && (m_curIfConditional != ifNodep)) continue; new SplitRVEdge(&m_graph, *it, vstdp); diff --git a/src/V3SplitVar.cpp b/src/V3SplitVar.cpp index a6b33376b..262d15b08 100644 --- a/src/V3SplitVar.cpp +++ b/src/V3SplitVar.cpp @@ -334,12 +334,9 @@ public: // Found nodes for SplitPackedVarVisitor struct RefsInModule { - typedef std::set VarSet; - typedef std::set VarRefSet; - typedef std::set SelSet; - VarSet m_vars; - VarRefSet m_refs; - SelSet m_sels; + std::set m_vars; + std::set m_refs; + std::set m_sels; public: void add(AstVar* nodep) { m_vars.insert(nodep); } @@ -362,7 +359,7 @@ public: } void visit(AstNVisitor* visitor) { for (const auto& varp : m_vars) visitor->iterate(varp); - for (SelSet::iterator it = m_sels.begin(), it_end = m_sels.end(); it != it_end; ++it) { + for (auto it = m_sels.begin(), it_end = m_sels.end(); it != it_end; ++it) { // If m_refs includes VarRef from ArraySel, remove it // because the VarRef would not be visited in SplitPackedVarVisitor::visit(AstSel*). if (AstVarRef* refp = VN_CAST((*it)->fromp(), VarRef)) { @@ -375,7 +372,7 @@ public: UASSERT_OBJ(reinterpret_cast((*it)->op1p()) != 1, *it, "stale"); visitor->iterate(*it); } - for (VarRefSet::iterator it = m_refs.begin(), it_end = m_refs.end(); it != it_end; ++it) { + for (auto it = m_refs.begin(), it_end = m_refs.end(); it != it_end; ++it) { UASSERT_OBJ(reinterpret_cast((*it)->op1p()) != 1, *it, "stale"); visitor->iterate(*it); } @@ -871,13 +868,11 @@ class PackedVarRef final { bool m_dedupDone = false; static void dedupRefs(std::vector& refs) { // Use raw pointer to dedup - typedef std::map NodeIndices; - NodeIndices nodes; + std::map nodes; for (size_t i = 0; i < refs.size(); ++i) { nodes.emplace(refs[i].nodep(), i); } std::vector vect; vect.reserve(nodes.size()); - for (NodeIndices::const_iterator it = nodes.begin(), it_end = nodes.end(); it != it_end; - ++it) { + for (auto it = nodes.cbegin(), it_end = nodes.cend(); it != it_end; ++it) { vect.push_back(refs[it->second]); } refs.swap(vect); @@ -955,12 +950,11 @@ public: }; class SplitPackedVarVisitor final : public AstNVisitor, public SplitVarImpl { - typedef std::map PackedVarRefMap; AstNetlist* m_netp; AstNodeModule* m_modp = nullptr; // Current module (just for log) int m_numSplit = 0; // Total number of split variables // key:variable to be split. value:location where the variable is referenced. - PackedVarRefMap m_refs; + std::map m_refs; virtual void visit(AstNodeFTask* nodep) override { if (!cannotSplitTaskReason(nodep)) iterateChildren(nodep); } @@ -1163,8 +1157,7 @@ class SplitPackedVarVisitor final : public AstNVisitor, public SplitVarImpl { } // Do the actual splitting operation void split() { - for (PackedVarRefMap::iterator it = m_refs.begin(), it_end = m_refs.end(); it != it_end; - ++it) { + for (auto it = m_refs.begin(), it_end = m_refs.end(); it != it_end; ++it) { it->second.dedup(); AstVar* varp = it->first; UINFO(3, "In module " << m_modp->name() << " var " << varp->prettyNameQ() diff --git a/src/V3StatsReport.cpp b/src/V3StatsReport.cpp index 530a06901..0c5d4b43f 100644 --- a/src/V3StatsReport.cpp +++ b/src/V3StatsReport.cpp @@ -49,8 +49,7 @@ class StatsReport final { void sumit() { // If sumit is set on a statistic, combine with others of same name - typedef std::multimap ByName; - ByName byName; + std::multimap byName; // * is always first for (auto& itr : s_allStats) { V3Statistic* repp = &itr; @@ -72,8 +71,7 @@ class StatsReport final { void stars() { // Find all stages size_t maxWidth = 0; - typedef std::multimap ByName; - ByName byName; + std::multimap byName; // * is always first for (const auto& itr : s_allStats) { const V3Statistic* repp = &itr; @@ -112,13 +110,11 @@ class StatsReport final { // Find all stages int stage = 0; size_t maxWidth = 0; - typedef std::vector Stages; - Stages stages; + std::vector stages; std::unordered_map stageInt; - typedef std::multimap ByName; - ByName byName; + std::multimap byName; // * is always first - for (StatColl::iterator it = s_allStats.begin(); it != s_allStats.end(); ++it) { + for (auto it = s_allStats.begin(); it != s_allStats.end(); ++it) { const V3Statistic* repp = &(*it); if (repp->stage() != "*" && repp->printit()) { if (maxWidth < repp->name().length()) maxWidth = repp->name().length(); @@ -144,7 +140,7 @@ class StatsReport final { string lastName = "__NONE__"; string lastCommaName = "__NONE__"; unsigned col = 0; - for (ByName::const_iterator it = byName.begin(); it != byName.end(); ++it) { + for (auto it = byName.cbegin(); it != byName.cend(); ++it) { const V3Statistic* repp = it->second; if (lastName != repp->name()) { lastName = repp->name(); diff --git a/src/V3String.h b/src/V3String.h index 60b4d03b2..b5e14cb3a 100644 --- a/src/V3String.h +++ b/src/V3String.h @@ -194,9 +194,8 @@ class VSpellCheck final { static constexpr unsigned LENGTH_LIMIT = 100; // Maximum string length to search // TYPES typedef unsigned int EditDistance; - typedef std::vector Candidates; // MEMBERS - Candidates m_candidates; // Strings we try to match + std::vector m_candidates; // Strings we try to match public: // CONSTRUCTORS VSpellCheck() = default; diff --git a/src/V3TSP.cpp b/src/V3TSP.cpp index f0666448d..ea33d5236 100644 --- a/src/V3TSP.cpp +++ b/src/V3TSP.cpp @@ -74,8 +74,7 @@ public: typedef TspVertexTmpl Vertex; // MEMBERS - typedef std::unordered_map VMap; - VMap m_vertices; // T_Key to Vertex lookup map + std::unordered_map m_vertices; // T_Key to Vertex lookup map // CONSTRUCTORS TspGraphTmpl() diff --git a/src/V3Table.cpp b/src/V3Table.cpp index 37ef613e1..6e35b8d10 100644 --- a/src/V3Table.cpp +++ b/src/V3Table.cpp @@ -77,8 +77,7 @@ private: // State cleared on each module AstNodeModule* m_modp = nullptr; // Current MODULE int m_modTables = 0; // Number of tables created in this module - typedef std::deque ModTableVector; - ModTableVector m_modTableVscs; // All tables created + std::deque m_modTableVscs; // All tables created // State cleared on each scope AstScope* m_scopep = nullptr; // Current SCOPE @@ -222,8 +221,7 @@ private: void createTableVars(AstNode* nodep) { // Create table for each output - typedef std::map NameCounts; - NameCounts namecounts; + std::map namecounts; for (const AstVarScope* outvscp : m_outVarps) { AstVar* outvarp = outvscp->varp(); FileLine* fl = nodep->fileline(); diff --git a/src/V3Task.cpp b/src/V3Task.cpp index 8f0663b1e..02f1136b7 100644 --- a/src/V3Task.cpp +++ b/src/V3Task.cpp @@ -105,7 +105,6 @@ private: // TYPES typedef std::map, AstVarScope*> VarToScopeMap; typedef std::unordered_map FuncToClassMap; - typedef std::vector Initials; // MEMBERS VarToScopeMap m_varToScopeMap; // Map for Var -> VarScope mappings FuncToClassMap m_funcToClassMap; // Map for ctor func -> class @@ -114,7 +113,7 @@ private: AstClass* m_classp = nullptr; // Current class V3Graph m_callGraph; // Task call graph TaskBaseVertex* m_curVxp; // Current vertex we're adding to - Initials m_initialps; // Initial blocks to move + std::vector m_initialps; // Initial blocks to move public: // METHODS @@ -1470,8 +1469,7 @@ V3TaskConnects V3Task::taskConnects(AstNodeFTaskRef* nodep, AstNode* taskStmtsp) // Missing pin/expr? We return (pinvar, nullptr) // Extra pin/expr? We clean it up - typedef std::map NameToIndex; - NameToIndex nameToIndex; + std::map nameToIndex; V3TaskConnects tconnects; UASSERT_OBJ(nodep->taskp(), nodep, "unlinked"); diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 1c5bbdfc2..21cc16c4c 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -200,7 +200,6 @@ private: // TYPES typedef std::map, AstVar*> TableMap; typedef std::map PatVecMap; - typedef std::map DTypeQMap; // STATE WidthVP* m_vup = nullptr; // Current node state @@ -214,7 +213,8 @@ private: bool m_doGenerate; // Do errors later inside generate statement int m_dtTables = 0; // Number of created data type tables TableMap m_tableMap; // Created tables so can remove duplicates - DTypeQMap m_queueDTypeIndexed; // Queues with given index type + std::map + m_queueDTypeIndexed; // Queues with given index type // ENUMS enum ExtendRule : uint8_t { @@ -3336,7 +3336,7 @@ private: // which member each AstPatMember corresponds to before we can // determine the dtypep for that PatMember's value, and then // width the initial value appropriately. - typedef std::map PatMap; + using PatMap = std::map; PatMap patmap; { AstMemberDType* memp = vdtypep->membersp();