diff --git a/src/V3ActiveTop.cpp b/src/V3ActiveTop.cpp index 75f1abeaa..4729d1501 100644 --- a/src/V3ActiveTop.cpp +++ b/src/V3ActiveTop.cpp @@ -36,11 +36,13 @@ VL_DEFINE_DEBUG_FUNCTIONS; // Active class functions class ActiveTopVisitor final : public VNVisitor { + // NODE STATE + // AstVarScope::user1() // bool. Processed + // STATE SenTreeFinder m_finder; // Find global sentree's / add them under the AstTopScope // METHODS - static bool isInitial(AstNode* nodep) { const VNUser1InUse user1InUse; // Return true if no variables that read. diff --git a/src/V3Begin.cpp b/src/V3Begin.cpp index 5cce373b0..e43711ad2 100644 --- a/src/V3Begin.cpp +++ b/src/V3Begin.cpp @@ -447,7 +447,7 @@ class BeginRelinkVisitor final : public VNVisitorConst { private: // NODE STATE // Input: - // AstNodeFTask::user1p // Node replaced, rename it + // AstNodeFTask::user1p // bool. Node replaced, rename it // VISITORS void visit(AstNodeFTaskRef* nodep) override { diff --git a/src/V3Cast.cpp b/src/V3Cast.cpp index 6f23fe88e..dac40a86f 100644 --- a/src/V3Cast.cpp +++ b/src/V3Cast.cpp @@ -49,7 +49,7 @@ VL_DEFINE_DEBUG_FUNCTIONS; class CastVisitor final : public VNVisitor { // NODE STATE // Entire netlist: - // AstNode::user1() // bool. Indicates node is of known size + // AstNode::user1() // bool. Node is of known size const VNUser1InUse m_inuser1; // STATE diff --git a/src/V3Clean.cpp b/src/V3Clean.cpp index 07920f8de..8366b23b9 100644 --- a/src/V3Clean.cpp +++ b/src/V3Clean.cpp @@ -35,7 +35,7 @@ VL_DEFINE_DEBUG_FUNCTIONS; class CleanVisitor final : public VNVisitor { // NODE STATE // Entire netlist: - // AstNode::user() -> CleanState. For this node, 0==UNKNOWN + // AstNode::user1() -> CleanState. For this node, 0==UNKNOWN // AstNode::user2() -> bool. True indicates widthMin has been propagated // AstNodeDType::user3() -> AstNodeDType*. Alternative node with C size const VNUser1InUse m_inuser1; diff --git a/src/V3Force.cpp b/src/V3Force.cpp index e832e2a74..ca20d3c61 100644 --- a/src/V3Force.cpp +++ b/src/V3Force.cpp @@ -142,8 +142,8 @@ private: using ScopeVarCache = std::unordered_map; // NODE STATE - // AstVarRef::user1 -> Flag indicating not to replace reference - // AstAssignForce::user2 -> true if force is synthetic (externally forceable) + // AstVarRef::user1 -> bool. Not to replace reference + // AstAssignForce::user2 -> bool. Force is synthetic (externally forceable) // AstVar::user3 -> ForceHelperVars via m_forceHelperVarsByVar const VNUser1InUse m_user1InUse; const VNUser2InUse m_user2InUse; diff --git a/src/V3Fork.cpp b/src/V3Fork.cpp index 0b58c859c..59edc9e78 100644 --- a/src/V3Fork.cpp +++ b/src/V3Fork.cpp @@ -267,10 +267,10 @@ private: class DynScopeVisitor final : public VNVisitor { // NODE STATE - // AstVar::user1() -> int, timing-control fork nesting level of that variable - // AstVarRef::user2() -> bool, 1 = Node is a class handle reference. The handle gets + // AstVar::user1() -> int. timing-control fork nesting level of that variable + // AstVarRef::user2() -> bool. Node is a class handle reference. The handle gets // modified in the context of this reference. - // AstAssignDly::user2() -> bool, true if already visited + // AstAssignDly::user2() -> bool. Already visited const VNUser1InUse m_inuser1; const VNUser2InUse m_inuser2; diff --git a/src/V3FuncOpt.cpp b/src/V3FuncOpt.cpp index 1fb6527e3..787827ef3 100644 --- a/src/V3FuncOpt.cpp +++ b/src/V3FuncOpt.cpp @@ -380,6 +380,8 @@ public: void V3FuncOpt::funcOptAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ":"); { + // NODE STATE + // AstNode::user1() -> bool. Processed const VNUser1InUse user1InUse; FuncOptStats stats; for (AstNodeModule* modp = nodep->modulesp(); modp; diff --git a/src/V3Inline.cpp b/src/V3Inline.cpp index 2dd934f54..4e71852a3 100644 --- a/src/V3Inline.cpp +++ b/src/V3Inline.cpp @@ -819,10 +819,10 @@ void inlineCell(AstNodeModule* modp, AstCell* cellp, bool last, InlineModGraph& void process(AstNetlist* netlistp, InlineModGraph& graph) { // NODE STATE // Cleared entire netlist - // AstIfaceRefDType::user1() // Whether the cell pointed to by this + // AstIfaceRefDType::user1() // bool; Whether the cell pointed to by this // // AstIfaceRefDType has been inlined - // AstCell::user3p() // AstCell*, the clone - // AstVar::user3p() // AstVar*, the clone + // AstCell::user3p() // AstCell*. The clone + // AstVar::user3p() // AstVar*. The clone // Cleared each cell // AstVar::user2p() // AstVarRef*/AstConst* This port is connected to (AstPin::expr()) const VNUser1InUse user1InUse; diff --git a/src/V3LifePost.cpp b/src/V3LifePost.cpp index e75ae3a7e..54c9a8d4d 100644 --- a/src/V3LifePost.cpp +++ b/src/V3LifePost.cpp @@ -114,7 +114,7 @@ class LifePostDlyVisitor final : public VNVisitorConst { // NODE STATE // AstVarScope::user1() -> bool: referenced outside _eval__nba - // AstVarScope::user4() -> AstVarScope*: Replacement variable + // AstVarScope::user4p() -> AstVarScope*: Replacement variable // AstExecGraph::user1p() -> GraphPathChecker*: path checker for this AstExecGraph const VNUser1InUse m_inuser1; const VNUser4InUse m_inuser4; diff --git a/src/V3Localize.cpp b/src/V3Localize.cpp index 17e069708..47cc6d940 100644 --- a/src/V3Localize.cpp +++ b/src/V3Localize.cpp @@ -38,10 +38,9 @@ VL_DEFINE_DEBUG_FUNCTIONS; class LocalizeVisitor final : public VNVisitor { // NODE STATE - // AstVarScope::user1() -> Bool indicating VarScope is not optimizable. - // AstCFunc::user1() -> Bool indicating CFunc is not a leaf function. - // AstVarScope::user2() -> Bool indicating VarScope was fully assigned in the current - // function. + // AstVarScope::user1() -> bool. VarScope is not optimizable + // AstCFunc::user1() -> bool. CFunc is not a leaf function + // AstVarScope::user2() -> bool. VarScope was fully assigned in current function // AstVarScope::user3p() -> Set of CFuncs referencing this VarScope. (via m_accessors) // AstCFunc::user4p() -> Multimap of 'VarScope -> VarRefs that reference that VarScope' // in this function. (via m_references) diff --git a/src/V3Premit.cpp b/src/V3Premit.cpp index c5a9fa9d1..82a3b0864 100644 --- a/src/V3Premit.cpp +++ b/src/V3Premit.cpp @@ -41,7 +41,7 @@ constexpr int STATIC_CONST_MIN_WIDTH = 256; // Minimum size to extract to stati class PremitVisitor final : public VNVisitor { // NODE STATE // AstNodeExpr::user() -> bool. True if iterated already - // *::user3() -> Used when visiting AstNodeAssign + // *::user3() -> bool. Used when visiting AstNodeAssign const VNUser1InUse m_inuser1; // STATE - across all visitors diff --git a/src/V3Randomize.cpp b/src/V3Randomize.cpp index 0acf11c60..3880529d4 100644 --- a/src/V3Randomize.cpp +++ b/src/V3Randomize.cpp @@ -3361,6 +3361,7 @@ class RandomizeVisitor final : public VNVisitor { // AstConstraintForeach::user3p() -> AstNode*. Dist bucket preamble stmts (foreach case) // AstClass::user4p() -> AstVar*. Constraint mode state variable // AstVar::user4p() -> AstVar*. Size variable for constrained queues + // AstNodeFTaskRef::user4() -> bool. Processed // AstMemberSel::user2p() -> AstNodeModule*. Pointer to containing module // VNUser1InUse m_inuser1; (Allocated for use in RandomizeMarkVisitor) // VNUser2InUse m_inuser2; (Allocated for use in RandomizeMarkVisitor) @@ -4586,8 +4587,7 @@ class RandomizeVisitor final : public VNVisitor { void wrapRandomizeCallWithNullGuard(AstNodeFTaskRef* nodep) { AstMethodCall* const callp = VN_CAST(nodep, MethodCall); if (!callp) return; - if (callp->user4()) return; - callp->user4(true); + if (callp->user4SetOnce()) return; FileLine* const fl = callp->fileline(); AstNodeExpr* const checkp = new AstNeq{fl, callp->fromp()->cloneTree(false), new AstConst{fl, AstConst::Null{}}}; diff --git a/src/V3Reorder.cpp b/src/V3Reorder.cpp index efa19aa73..1b0ae5f14 100644 --- a/src/V3Reorder.cpp +++ b/src/V3Reorder.cpp @@ -236,10 +236,10 @@ public: class ReorderVisitor final : public VNVisitor { // NODE STATE - Only under AstAlways - // AstVarScope::user1p -> Var ReorderVarStdVertex* for usage var, 0=not set yet - // AstVarScope::user2p -> Var ReorderVarPostVertex* for delayed assignment var, 0=not set yet - // Ast*::user3p -> Statement ReorderLogicVertex* (temporary only) - // Ast*::user4 -> Current ordering number (reorderBlock usage) + // AstVarScope::user1p -> ReorderVarStdVertex*. Usage var, 0=not set yet + // AstVarScope::user2p -> ReorderVarPostVertex*. Delayed assignment var, 0=not set yet + // Ast*::user3p -> ReorderLogicVertex*. Statement (temporary only) + // Ast*::user4 -> int. Current ordering number (reorderBlock usage) // STATE V3Graph* m_graphp = nullptr; // Scoreboard of var usages/dependencies diff --git a/src/V3SchedPartition.cpp b/src/V3SchedPartition.cpp index 183c067a4..d27e9ee9b 100644 --- a/src/V3SchedPartition.cpp +++ b/src/V3SchedPartition.cpp @@ -118,7 +118,7 @@ public: class SchedGraphBuilder final : public VNVisitor { // NODE STATE - // AstVarScope::user1() -> SchedVarVertex + // AstVarScope::user1p() -> SchedVarVertex // AstSenItem::user1p() -> SchedSenVertex // AstVarScope::user2() -> bool: Read of this AstVarScope triggers this logic. // Used only for hybrid logic. diff --git a/src/V3Slice.cpp b/src/V3Slice.cpp index 4331e4015..0d410cec3 100644 --- a/src/V3Slice.cpp +++ b/src/V3Slice.cpp @@ -52,8 +52,8 @@ class SliceVisitor final : public VNVisitor { // AstNodeUniop::user1() -> bool. True if find is complete // AstArraySel::user1p() -> AstVarRef. The VarRef that the final ArraySel points to const VNUser1InUse m_inuser1; - // AstInitArray::user2() -> Previously accessed itemIdx - // AstInitItem::user2() -> Corresponding first elemIdx + // AstInitArray::user2() -> int. Previously accessed itemIdx + // AstInitItem::user2() -> int. Corresponding first elemIdx const VNUser2InUse m_inuser2; // STATE - across all visitors diff --git a/src/V3TraceDecl.cpp b/src/V3TraceDecl.cpp index 29c625f94..e0e99340f 100644 --- a/src/V3TraceDecl.cpp +++ b/src/V3TraceDecl.cpp @@ -106,8 +106,8 @@ public: class TraceDeclVisitor final : public VNVisitor { // NODE STATE - // AstCFunc::user1() // code offset for current type - // AstCFunc::user2() // VarScope for dtype functions + // AstCFunc::user1() // uint32_t. code offset for current type + // AstCFunc::user2() // VarScope* for dtype functions // STATE AstTopScope* const m_topScopep; // The singleton AstTopScope diff --git a/src/V3WidthCommit.cpp b/src/V3WidthCommit.cpp index be4aa99be..20fcb1c04 100644 --- a/src/V3WidthCommit.cpp +++ b/src/V3WidthCommit.cpp @@ -37,7 +37,7 @@ VL_DEFINE_DEBUG_FUNCTIONS; class WidthCommitVisitor final : public VNVisitor { // NODE STATE - // AstVar::user1p -> bool, processed + // AstVar::user1p -> bool. Processed // AstNodeFTask::user2() -> int. Non-zero if ever referenced (called) // AstNew::user2() -> int. Count of number of references, minus references in // functions never called