Internals: Cleanup some user() comments. No functional change.
Fixes #8048.
This commit is contained in:
parent
18844537bd
commit
7601011bba
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -142,8 +142,8 @@ private:
|
|||
using ScopeVarCache = std::unordered_map<const AstVar*, AstVarScope*>;
|
||||
|
||||
// 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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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{}}};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue