Skip to content

Commit

Permalink
Add access argument to linkLValueSet
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Nov 14, 2023
1 parent 9fd5634 commit 52aba2c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/V3LinkLValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ void V3LinkLValue::linkLValue(AstNetlist* nodep) {
{ LinkLValueVisitor{nodep, VAccess::NOCHANGE}; } // Destruct before checking
V3Global::dumpCheckGlobalTree("linklvalue", 0, dumpTreeLevel() >= 6);
}
void V3LinkLValue::linkLValueSet(AstNode* nodep) {
void V3LinkLValue::linkLValueSet(AstNode* nodep, const VAccess& access) {
// Called by later link functions when it is known a node needs
// to be converted to a lvalue.
UINFO(9, __FUNCTION__ << ": " << endl);
{ LinkLValueVisitor{nodep, VAccess::WRITE}; }
{ LinkLValueVisitor{nodep, access}; }
}
2 changes: 1 addition & 1 deletion src/V3LinkLValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AstNode;
class V3LinkLValue final {
public:
static void linkLValue(AstNetlist* nodep) VL_MT_DISABLED;
static void linkLValueSet(AstNode* nodep) VL_MT_DISABLED;
static void linkLValueSet(AstNode* nodep, const VAccess& access) VL_MT_DISABLED;
};

#endif // Guard
4 changes: 2 additions & 2 deletions src/V3Task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ class TaskVisitor final : public VNVisitor {
}
} else if (portp->isInoutish()) {
// if (debug() >= 9) pinp->dumpTree("-pinrsize- ");
V3LinkLValue::linkLValueSet(pinp);
V3LinkLValue::linkLValueSet(pinp, VAccess::WRITE);

AstVarScope* const newvscp
= createVarScope(portp, namePrefix + "__" + portp->shortName());
Expand All @@ -529,7 +529,7 @@ class TaskVisitor final : public VNVisitor {
// This is slightly scary; are we sure no decisions were made
// before here based on this not being a lvalue?
// Doesn't seem so; V3Unknown uses it earlier, but works ok.
V3LinkLValue::linkLValueSet(pinp);
V3LinkLValue::linkLValueSet(pinp, VAccess::WRITE);
// Even if it's referencing a varref, we still make a temporary
// Else task(x,x,x) might produce incorrect results
AstVarScope* const newvscp
Expand Down

0 comments on commit 52aba2c

Please sign in to comment.