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
|
// Active class functions
|
||||||
|
|
||||||
class ActiveTopVisitor final : public VNVisitor {
|
class ActiveTopVisitor final : public VNVisitor {
|
||||||
|
// NODE STATE
|
||||||
|
// AstVarScope::user1() // bool. Processed
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
SenTreeFinder m_finder; // Find global sentree's / add them under the AstTopScope
|
SenTreeFinder m_finder; // Find global sentree's / add them under the AstTopScope
|
||||||
|
|
||||||
// METHODS
|
// METHODS
|
||||||
|
|
||||||
static bool isInitial(AstNode* nodep) {
|
static bool isInitial(AstNode* nodep) {
|
||||||
const VNUser1InUse user1InUse;
|
const VNUser1InUse user1InUse;
|
||||||
// Return true if no variables that read.
|
// Return true if no variables that read.
|
||||||
|
|
|
||||||
|
|
@ -447,7 +447,7 @@ class BeginRelinkVisitor final : public VNVisitorConst {
|
||||||
private:
|
private:
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// Input:
|
// Input:
|
||||||
// AstNodeFTask::user1p // Node replaced, rename it
|
// AstNodeFTask::user1p // bool. Node replaced, rename it
|
||||||
|
|
||||||
// VISITORS
|
// VISITORS
|
||||||
void visit(AstNodeFTaskRef* nodep) override {
|
void visit(AstNodeFTaskRef* nodep) override {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ VL_DEFINE_DEBUG_FUNCTIONS;
|
||||||
class CastVisitor final : public VNVisitor {
|
class CastVisitor final : public VNVisitor {
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// Entire netlist:
|
// Entire netlist:
|
||||||
// AstNode::user1() // bool. Indicates node is of known size
|
// AstNode::user1() // bool. Node is of known size
|
||||||
const VNUser1InUse m_inuser1;
|
const VNUser1InUse m_inuser1;
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ VL_DEFINE_DEBUG_FUNCTIONS;
|
||||||
class CleanVisitor final : public VNVisitor {
|
class CleanVisitor final : public VNVisitor {
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// Entire netlist:
|
// 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
|
// AstNode::user2() -> bool. True indicates widthMin has been propagated
|
||||||
// AstNodeDType::user3() -> AstNodeDType*. Alternative node with C size
|
// AstNodeDType::user3() -> AstNodeDType*. Alternative node with C size
|
||||||
const VNUser1InUse m_inuser1;
|
const VNUser1InUse m_inuser1;
|
||||||
|
|
|
||||||
|
|
@ -142,8 +142,8 @@ private:
|
||||||
using ScopeVarCache = std::unordered_map<const AstVar*, AstVarScope*>;
|
using ScopeVarCache = std::unordered_map<const AstVar*, AstVarScope*>;
|
||||||
|
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// AstVarRef::user1 -> Flag indicating not to replace reference
|
// AstVarRef::user1 -> bool. Not to replace reference
|
||||||
// AstAssignForce::user2 -> true if force is synthetic (externally forceable)
|
// AstAssignForce::user2 -> bool. Force is synthetic (externally forceable)
|
||||||
// AstVar::user3 -> ForceHelperVars via m_forceHelperVarsByVar
|
// AstVar::user3 -> ForceHelperVars via m_forceHelperVarsByVar
|
||||||
const VNUser1InUse m_user1InUse;
|
const VNUser1InUse m_user1InUse;
|
||||||
const VNUser2InUse m_user2InUse;
|
const VNUser2InUse m_user2InUse;
|
||||||
|
|
|
||||||
|
|
@ -267,10 +267,10 @@ private:
|
||||||
|
|
||||||
class DynScopeVisitor final : public VNVisitor {
|
class DynScopeVisitor final : public VNVisitor {
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// AstVar::user1() -> int, timing-control fork nesting level of that variable
|
// AstVar::user1() -> int. timing-control fork nesting level of that variable
|
||||||
// AstVarRef::user2() -> bool, 1 = Node is a class handle reference. The handle gets
|
// AstVarRef::user2() -> bool. Node is a class handle reference. The handle gets
|
||||||
// modified in the context of this reference.
|
// modified in the context of this reference.
|
||||||
// AstAssignDly::user2() -> bool, true if already visited
|
// AstAssignDly::user2() -> bool. Already visited
|
||||||
const VNUser1InUse m_inuser1;
|
const VNUser1InUse m_inuser1;
|
||||||
const VNUser2InUse m_inuser2;
|
const VNUser2InUse m_inuser2;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -380,6 +380,8 @@ public:
|
||||||
void V3FuncOpt::funcOptAll(AstNetlist* nodep) {
|
void V3FuncOpt::funcOptAll(AstNetlist* nodep) {
|
||||||
UINFO(2, __FUNCTION__ << ":");
|
UINFO(2, __FUNCTION__ << ":");
|
||||||
{
|
{
|
||||||
|
// NODE STATE
|
||||||
|
// AstNode::user1() -> bool. Processed
|
||||||
const VNUser1InUse user1InUse;
|
const VNUser1InUse user1InUse;
|
||||||
FuncOptStats stats;
|
FuncOptStats stats;
|
||||||
for (AstNodeModule* modp = nodep->modulesp(); modp;
|
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) {
|
void process(AstNetlist* netlistp, InlineModGraph& graph) {
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// Cleared entire netlist
|
// 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
|
// // AstIfaceRefDType has been inlined
|
||||||
// AstCell::user3p() // AstCell*, the clone
|
// AstCell::user3p() // AstCell*. The clone
|
||||||
// AstVar::user3p() // AstVar*, the clone
|
// AstVar::user3p() // AstVar*. The clone
|
||||||
// Cleared each cell
|
// Cleared each cell
|
||||||
// AstVar::user2p() // AstVarRef*/AstConst* This port is connected to (AstPin::expr())
|
// AstVar::user2p() // AstVarRef*/AstConst* This port is connected to (AstPin::expr())
|
||||||
const VNUser1InUse user1InUse;
|
const VNUser1InUse user1InUse;
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ class LifePostDlyVisitor final : public VNVisitorConst {
|
||||||
|
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// AstVarScope::user1() -> bool: referenced outside _eval__nba
|
// 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
|
// AstExecGraph::user1p() -> GraphPathChecker*: path checker for this AstExecGraph
|
||||||
const VNUser1InUse m_inuser1;
|
const VNUser1InUse m_inuser1;
|
||||||
const VNUser4InUse m_inuser4;
|
const VNUser4InUse m_inuser4;
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,9 @@ VL_DEFINE_DEBUG_FUNCTIONS;
|
||||||
|
|
||||||
class LocalizeVisitor final : public VNVisitor {
|
class LocalizeVisitor final : public VNVisitor {
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// AstVarScope::user1() -> Bool indicating VarScope is not optimizable.
|
// AstVarScope::user1() -> bool. VarScope is not optimizable
|
||||||
// AstCFunc::user1() -> Bool indicating CFunc is not a leaf function.
|
// AstCFunc::user1() -> bool. CFunc is not a leaf function
|
||||||
// AstVarScope::user2() -> Bool indicating VarScope was fully assigned in the current
|
// AstVarScope::user2() -> bool. VarScope was fully assigned in current function
|
||||||
// function.
|
|
||||||
// AstVarScope::user3p() -> Set of CFuncs referencing this VarScope. (via m_accessors)
|
// AstVarScope::user3p() -> Set of CFuncs referencing this VarScope. (via m_accessors)
|
||||||
// AstCFunc::user4p() -> Multimap of 'VarScope -> VarRefs that reference that VarScope'
|
// AstCFunc::user4p() -> Multimap of 'VarScope -> VarRefs that reference that VarScope'
|
||||||
// in this function. (via m_references)
|
// 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 {
|
class PremitVisitor final : public VNVisitor {
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// AstNodeExpr::user() -> bool. True if iterated already
|
// AstNodeExpr::user() -> bool. True if iterated already
|
||||||
// *::user3() -> Used when visiting AstNodeAssign
|
// *::user3() -> bool. Used when visiting AstNodeAssign
|
||||||
const VNUser1InUse m_inuser1;
|
const VNUser1InUse m_inuser1;
|
||||||
|
|
||||||
// STATE - across all visitors
|
// STATE - across all visitors
|
||||||
|
|
|
||||||
|
|
@ -3361,6 +3361,7 @@ class RandomizeVisitor final : public VNVisitor {
|
||||||
// AstConstraintForeach::user3p() -> AstNode*. Dist bucket preamble stmts (foreach case)
|
// AstConstraintForeach::user3p() -> AstNode*. Dist bucket preamble stmts (foreach case)
|
||||||
// AstClass::user4p() -> AstVar*. Constraint mode state variable
|
// AstClass::user4p() -> AstVar*. Constraint mode state variable
|
||||||
// AstVar::user4p() -> AstVar*. Size variable for constrained queues
|
// AstVar::user4p() -> AstVar*. Size variable for constrained queues
|
||||||
|
// AstNodeFTaskRef::user4() -> bool. Processed
|
||||||
// AstMemberSel::user2p() -> AstNodeModule*. Pointer to containing module
|
// AstMemberSel::user2p() -> AstNodeModule*. Pointer to containing module
|
||||||
// VNUser1InUse m_inuser1; (Allocated for use in RandomizeMarkVisitor)
|
// VNUser1InUse m_inuser1; (Allocated for use in RandomizeMarkVisitor)
|
||||||
// VNUser2InUse m_inuser2; (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) {
|
void wrapRandomizeCallWithNullGuard(AstNodeFTaskRef* nodep) {
|
||||||
AstMethodCall* const callp = VN_CAST(nodep, MethodCall);
|
AstMethodCall* const callp = VN_CAST(nodep, MethodCall);
|
||||||
if (!callp) return;
|
if (!callp) return;
|
||||||
if (callp->user4()) return;
|
if (callp->user4SetOnce()) return;
|
||||||
callp->user4(true);
|
|
||||||
FileLine* const fl = callp->fileline();
|
FileLine* const fl = callp->fileline();
|
||||||
AstNodeExpr* const checkp
|
AstNodeExpr* const checkp
|
||||||
= new AstNeq{fl, callp->fromp()->cloneTree(false), new AstConst{fl, AstConst::Null{}}};
|
= new AstNeq{fl, callp->fromp()->cloneTree(false), new AstConst{fl, AstConst::Null{}}};
|
||||||
|
|
|
||||||
|
|
@ -236,10 +236,10 @@ public:
|
||||||
|
|
||||||
class ReorderVisitor final : public VNVisitor {
|
class ReorderVisitor final : public VNVisitor {
|
||||||
// NODE STATE - Only under AstAlways
|
// NODE STATE - Only under AstAlways
|
||||||
// AstVarScope::user1p -> Var ReorderVarStdVertex* for usage var, 0=not set yet
|
// AstVarScope::user1p -> ReorderVarStdVertex*. Usage var, 0=not set yet
|
||||||
// AstVarScope::user2p -> Var ReorderVarPostVertex* for delayed assignment var, 0=not set yet
|
// AstVarScope::user2p -> ReorderVarPostVertex*. Delayed assignment var, 0=not set yet
|
||||||
// Ast*::user3p -> Statement ReorderLogicVertex* (temporary only)
|
// Ast*::user3p -> ReorderLogicVertex*. Statement (temporary only)
|
||||||
// Ast*::user4 -> Current ordering number (reorderBlock usage)
|
// Ast*::user4 -> int. Current ordering number (reorderBlock usage)
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
V3Graph* m_graphp = nullptr; // Scoreboard of var usages/dependencies
|
V3Graph* m_graphp = nullptr; // Scoreboard of var usages/dependencies
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ public:
|
||||||
|
|
||||||
class SchedGraphBuilder final : public VNVisitor {
|
class SchedGraphBuilder final : public VNVisitor {
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// AstVarScope::user1() -> SchedVarVertex
|
// AstVarScope::user1p() -> SchedVarVertex
|
||||||
// AstSenItem::user1p() -> SchedSenVertex
|
// AstSenItem::user1p() -> SchedSenVertex
|
||||||
// AstVarScope::user2() -> bool: Read of this AstVarScope triggers this logic.
|
// AstVarScope::user2() -> bool: Read of this AstVarScope triggers this logic.
|
||||||
// Used only for hybrid logic.
|
// Used only for hybrid logic.
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,8 @@ class SliceVisitor final : public VNVisitor {
|
||||||
// AstNodeUniop::user1() -> bool. True if find is complete
|
// AstNodeUniop::user1() -> bool. True if find is complete
|
||||||
// AstArraySel::user1p() -> AstVarRef. The VarRef that the final ArraySel points to
|
// AstArraySel::user1p() -> AstVarRef. The VarRef that the final ArraySel points to
|
||||||
const VNUser1InUse m_inuser1;
|
const VNUser1InUse m_inuser1;
|
||||||
// AstInitArray::user2() -> Previously accessed itemIdx
|
// AstInitArray::user2() -> int. Previously accessed itemIdx
|
||||||
// AstInitItem::user2() -> Corresponding first elemIdx
|
// AstInitItem::user2() -> int. Corresponding first elemIdx
|
||||||
const VNUser2InUse m_inuser2;
|
const VNUser2InUse m_inuser2;
|
||||||
|
|
||||||
// STATE - across all visitors
|
// STATE - across all visitors
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,8 @@ public:
|
||||||
|
|
||||||
class TraceDeclVisitor final : public VNVisitor {
|
class TraceDeclVisitor final : public VNVisitor {
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// AstCFunc::user1() // code offset for current type
|
// AstCFunc::user1() // uint32_t. code offset for current type
|
||||||
// AstCFunc::user2() // VarScope for dtype functions
|
// AstCFunc::user2() // VarScope* for dtype functions
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
AstTopScope* const m_topScopep; // The singleton AstTopScope
|
AstTopScope* const m_topScopep; // The singleton AstTopScope
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ VL_DEFINE_DEBUG_FUNCTIONS;
|
||||||
|
|
||||||
class WidthCommitVisitor final : public VNVisitor {
|
class WidthCommitVisitor final : public VNVisitor {
|
||||||
// NODE STATE
|
// NODE STATE
|
||||||
// AstVar::user1p -> bool, processed
|
// AstVar::user1p -> bool. Processed
|
||||||
// AstNodeFTask::user2() -> int. Non-zero if ever referenced (called)
|
// AstNodeFTask::user2() -> int. Non-zero if ever referenced (called)
|
||||||
// AstNew::user2() -> int. Count of number of references, minus references in
|
// AstNew::user2() -> int. Count of number of references, minus references in
|
||||||
// functions never called
|
// functions never called
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue