Internals: Cleanup V3FuncOpt (#6590)

This commit is contained in:
Bartłomiej Chmiel 2025-10-24 13:42:13 +02:00 committed by GitHub
parent cc28b07dc1
commit 65c5071246
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 5 deletions

View File

@ -35,7 +35,6 @@
#include "V3Global.h" #include "V3Global.h"
#include "V3Stats.h" #include "V3Stats.h"
#include "V3ThreadPool.h"
VL_DEFINE_DEBUG_FUNCTIONS; VL_DEFINE_DEBUG_FUNCTIONS;
@ -335,10 +334,9 @@ void V3FuncOpt::funcOptAll(AstNetlist* nodep) {
{ {
const VNUser1InUse user1InUse; const VNUser1InUse user1InUse;
FuncOptStats stats; FuncOptStats stats;
for (AstNodeModule *modp = nodep->modulesp(), *nextModp; modp; modp = nextModp) { for (AstNodeModule* modp = nodep->modulesp(); modp;
nextModp = VN_AS(modp->nextp(), NodeModule); modp = VN_AS(modp->nextp(), NodeModule)) {
for (AstNode *stmtp = modp->stmtsp(), *nextStmtp; stmtp; stmtp = nextStmtp) { for (AstNode* stmtp = modp->stmtsp(); stmtp; stmtp = stmtp->nextp()) {
nextStmtp = stmtp->nextp();
if (AstCFunc* const cfuncp = VN_CAST(stmtp, CFunc)) { if (AstCFunc* const cfuncp = VN_CAST(stmtp, CFunc)) {
FuncOptVisitor::apply(stats, cfuncp); FuncOptVisitor::apply(stats, cfuncp);
} }