Fix PR review suggestions
This commit is contained in:
parent
8b0dea8e87
commit
7c1de44646
|
|
@ -593,14 +593,15 @@ class ForkVisitor final : public VNVisitor {
|
|||
const AstConst* const constp = VN_CAST(delayp->lhsp(), Const);
|
||||
return constp && (constp->toUQuad() == std::numeric_limits<uint64_t>::max());
|
||||
}
|
||||
static bool isDisableProcessQueueExpr(const AstNode* const nodep) {
|
||||
const AstVar* varp = nullptr;
|
||||
if (const AstVarRef* const refp = VN_CAST(nodep, VarRef)) {
|
||||
varp = refp->varp();
|
||||
} else if (const AstMemberSel* const selp = VN_CAST(nodep, MemberSel)) {
|
||||
varp = selp->varp();
|
||||
static bool isDisableProcessQueueExpr(const AstNodeExpr* const nodep) {
|
||||
const AstNode* const basep
|
||||
= AstArraySel::baseFromp(const_cast<AstNodeExpr*>(nodep), false);
|
||||
if (const AstVarRef* const refp = VN_CAST(basep, VarRef))
|
||||
return refp->varp()->processQueue();
|
||||
if (const AstMemberSel* const selp = VN_CAST(basep, MemberSel)) {
|
||||
return selp->varp() && selp->varp()->processQueue();
|
||||
}
|
||||
return varp && varp->processQueue();
|
||||
return false;
|
||||
}
|
||||
static bool isDisableQueuePushSelfStmt(const AstNode* const nodep) {
|
||||
// Detect LinkJump-generated registration:
|
||||
|
|
|
|||
|
|
@ -96,13 +96,9 @@ static string extractDottedPath(AstNode* nodep, bool& hasPartSelect) {
|
|||
}
|
||||
return "";
|
||||
}
|
||||
static AstNode* parentNodep(AstNode* nodep) {
|
||||
while (nodep && nodep->backp() && nodep->backp()->nextp() == nodep) nodep = nodep->backp();
|
||||
return nodep ? nodep->backp() : nullptr;
|
||||
}
|
||||
static string lexicalDisablePath(AstNode* const targetp) {
|
||||
std::vector<string> names;
|
||||
for (AstNode* curp = targetp; curp; curp = parentNodep(curp)) {
|
||||
for (AstNode* curp = targetp; curp; curp = curp->aboveLoopp()) {
|
||||
if (AstNodeBlock* const blockp = VN_CAST(curp, NodeBlock)) {
|
||||
if (blockp->name() != "") names.push_back(blockp->name());
|
||||
} else if (AstNodeFTask* const ftaskp = VN_CAST(curp, NodeFTask)) {
|
||||
|
|
@ -6210,8 +6206,7 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
|||
pushDeletep(nodep->unlinkFrBack());
|
||||
}
|
||||
if (nodep->targetp()) {
|
||||
AstNodeExpr* oldRefp = nodep->targetRefp()->unlinkFrBack();
|
||||
VL_DO_DANGLING(oldRefp->deleteTree(), oldRefp);
|
||||
nodep->targetRefp()->unlinkFrBack()->deleteTree();
|
||||
if (!hasPartSelect) {
|
||||
const string instancePath = targetInstancePath(nodep->targetp(), targetPath);
|
||||
if (instancePath != "") {
|
||||
|
|
|
|||
|
|
@ -168,12 +168,8 @@ class LinkJumpVisitor final : public VNVisitor {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
static AstNode* parentNodep(AstNode* nodep) {
|
||||
while (nodep && nodep->backp() && nodep->backp()->nextp() == nodep) nodep = nodep->backp();
|
||||
return nodep ? nodep->backp() : nullptr;
|
||||
}
|
||||
static AstNodeModule* findOwnerModulep(AstNode* nodep) {
|
||||
for (AstNode* curp = nodep; curp; curp = parentNodep(curp)) {
|
||||
for (AstNode* curp = nodep; curp; curp = curp->aboveLoopp()) {
|
||||
if (AstNodeModule* const modp = VN_CAST(curp, NodeModule)) return modp;
|
||||
}
|
||||
return nullptr;
|
||||
|
|
@ -239,8 +235,7 @@ class LinkJumpVisitor final : public VNVisitor {
|
|||
killQueueCall->classOrPackagep(v3Global.rootp()->stdPackageProcessp());
|
||||
return new AstStmtExpr{fl, killQueueCall};
|
||||
}
|
||||
template <typename T_Node>
|
||||
static void prependStmtsp(T_Node* const nodep, AstNode* const stmtp) {
|
||||
static void prependStmtsp(AstBegin* const nodep, AstNode* const stmtp) {
|
||||
if (AstNode* const origStmtsp = nodep->stmtsp()) {
|
||||
origStmtsp->unlinkFrBackWithNext();
|
||||
stmtp->addNext(origStmtsp);
|
||||
|
|
|
|||
|
|
@ -749,14 +749,15 @@ class TimingControlVisitor final : public VNVisitor {
|
|||
addDebugInfo(donep);
|
||||
beginp->addStmtsp(donep->makeStmt());
|
||||
}
|
||||
static bool isDisableProcessQueueExpr(const AstNode* const nodep) {
|
||||
const AstVar* varp = nullptr;
|
||||
if (const AstVarRef* const refp = VN_CAST(nodep, VarRef)) {
|
||||
varp = refp->varp();
|
||||
} else if (const AstMemberSel* const selp = VN_CAST(nodep, MemberSel)) {
|
||||
varp = selp->varp();
|
||||
static bool isDisableProcessQueueExpr(const AstNodeExpr* const nodep) {
|
||||
const AstNode* const basep
|
||||
= AstArraySel::baseFromp(const_cast<AstNodeExpr*>(nodep), false);
|
||||
if (const AstVarRef* const refp = VN_CAST(basep, VarRef))
|
||||
return refp->varp()->processQueue();
|
||||
if (const AstMemberSel* const selp = VN_CAST(basep, MemberSel)) {
|
||||
return selp->varp() && selp->varp()->processQueue();
|
||||
}
|
||||
return varp && varp->processQueue();
|
||||
return false;
|
||||
}
|
||||
static bool hasDisableQueuePushSelfPrefix(const AstBegin* const beginp) {
|
||||
// LinkJump prepends disable-by-name registration as:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--binary", "-Wno-ZERODLY"])
|
||||
test.compile(verilator_flags2=["--binary"])
|
||||
|
||||
test.execute()
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--binary", "-Wno-ZERODLY"])
|
||||
test.compile(verilator_flags2=["--binary"])
|
||||
|
||||
test.execute()
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--binary", "-Wno-ZERODLY"])
|
||||
test.compile(verilator_flags2=["--binary"])
|
||||
|
||||
test.execute()
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--binary", "-Wno-ZERODLY"])
|
||||
test.compile(verilator_flags2=["--binary"])
|
||||
|
||||
test.execute()
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--binary", "-Wno-ZERODLY"])
|
||||
test.compile(verilator_flags2=["--binary"])
|
||||
|
||||
test.execute()
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--binary", "-Wno-ZERODLY"])
|
||||
test.compile(verilator_flags2=["--binary"])
|
||||
|
||||
test.execute()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue