Internals: Remove unneeded return, cleanup param test. No functional change

This commit is contained in:
Wilson Snyder
2025-08-30 07:42:41 -04:00
parent fbfd1f12dd
commit 712ff95a48
6 changed files with 111 additions and 109 deletions
+2 -4
View File
@@ -4047,8 +4047,7 @@ void V3Const::constifyParamsNoWarnEdit(AstNode* nodep) {
//! generated. Since such occurrences, must be constant, in order to be
//! something a generate block can depend on, we can wait until later to do the
//! width check.
//! @return Pointer to the edited node.
AstNode* V3Const::constifyGenerateParamsEdit(AstNode* nodep) {
void V3Const::constifyGenerateParamsEdit(AstNode* nodep) {
// UINFOTREE(1, nodep, "", "forceConPRE:");
// Resize even if the node already has a width, because buried in the tree
// we may have a node we just created with signing, etc, that isn't sized
@@ -4064,11 +4063,10 @@ AstNode* V3Const::constifyGenerateParamsEdit(AstNode* nodep) {
// init value because we need widthing above to handle the var's type.
if (varp->valuep()) visitor.mainAcceptEdit(varp->valuep());
} else {
nodep = visitor.mainAcceptEdit(nodep);
VL_DO_DANGLING(visitor.mainAcceptEdit(nodep), nodep);
}
// Because we do edits, nodep links may get trashed and core dump this.
// UINFOTREE(1, nodep, "", "forceConDONE");
return nodep;
}
void V3Const::constifyAllLint(AstNetlist* nodep) {
+1 -1
View File
@@ -28,7 +28,7 @@ class V3Const final {
public:
static void constifyParamsEdit(AstNode* nodep) VL_MT_DISABLED;
static void constifyParamsNoWarnEdit(AstNode* nodep) VL_MT_DISABLED;
static AstNode* constifyGenerateParamsEdit(AstNode* nodep) VL_MT_DISABLED;
static void constifyGenerateParamsEdit(AstNode* nodep) VL_MT_DISABLED;
// Only do constant pushing, without removing dead logic
static void constifyAllLive(AstNetlist* nodep) VL_MT_DISABLED;
// Everything that's possible