Internals: Cleanup dead function names. Merge from dtype. No functional change.

This commit is contained in:
Wilson Snyder 2012-04-29 08:24:32 -04:00
parent 33577eaa68
commit 9c4ef27d49
5 changed files with 34 additions and 17 deletions

View File

@ -241,7 +241,15 @@ public:
//######################################################################
// Dead class functions
void V3Dead::deadifyAll(AstNetlist* nodep, bool elimUserVars) {
void V3Dead::deadifyModules(AstNetlist* nodep) {
UINFO(2,__FUNCTION__<<": "<<endl);
DeadVisitor visitor (nodep, elimUserVars);
DeadVisitor visitor (nodep, false);
}
void V3Dead::deadifyDTypes(AstNetlist* nodep) {
UINFO(2,__FUNCTION__<<": "<<endl);
DeadVisitor visitor (nodep, false);
}
void V3Dead::deadifyAll(AstNetlist* nodep) {
UINFO(2,__FUNCTION__<<": "<<endl);
DeadVisitor visitor (nodep, true);
}

View File

@ -31,8 +31,12 @@
class V3Dead {
public:
// Modules, no vars/dtypes
static void deadifyModules(AstNetlist* nodep);
// Modules, Data types
static void deadifyDTypes(AstNetlist* nodep);
// Everything that's possible
static void deadifyAll(AstNetlist* nodep, bool elimUserVars);
static void deadifyAll(AstNetlist* nodep);
};
#endif // Guard

View File

@ -67,6 +67,7 @@ public:
//######################################################################
// Given a node, flip any VarRef from LValue to RValue (i.e. make it an input)
// See also V3LinkLValue::linkLValueSet
class TristateInPinVisitor : public TristateBaseVisitor {
// VISITORS

View File

@ -61,6 +61,10 @@
// Logicals convert compared to zero
// If any operand is real, result is real
//*************************************************************************
// V3Width is the only visitor that uses vup. We could switch to using userp,
// though note some iterators operate on next() and so would need to pass the
// same value on each nextp().
//*************************************************************************
#include "config_build.h"
#include "verilatedos.h"

View File

@ -185,7 +185,7 @@ void process () {
V3Error::abortIfErrors();
// Remove any modules that were parameterized and are no longer referenced.
V3Dead::deadifyAll(v3Global.rootp(), false);
V3Dead::deadifyModules(v3Global.rootp());
if (dumpMore) V3Global::dumpGlobalTree("dead.tree");
v3Global.checkTree();
@ -274,10 +274,10 @@ void process () {
// Initial const/dead to reduce work for ordering code
V3Const::constifyAll(v3Global.rootp());
if (dumpMore) V3Global::dumpGlobalTree("const_predad.tree");
if (dumpMore) V3Global::dumpGlobalTree("const_predead.tree");
v3Global.checkTree();
V3Dead::deadifyAll(v3Global.rootp(), false);
V3Dead::deadifyDTypes(v3Global.rootp());
V3Global::dumpGlobalTree("const.tree");
v3Global.checkTree();
@ -309,8 +309,8 @@ void process () {
if (!v3Global.opt.xmlOnly()) {
// Cleanup
V3Const::constifyAll(v3Global.rootp());
if (dumpMore) V3Global::dumpGlobalTree("const_predad.tree");
V3Dead::deadifyAll(v3Global.rootp(), false);
if (dumpMore) V3Global::dumpGlobalTree("const_predead.tree");
V3Dead::deadifyDTypes(v3Global.rootp());
v3Global.checkTree();
V3Global::dumpGlobalTree("const.tree");
@ -353,8 +353,8 @@ void process () {
// Cleanup
V3Const::constifyAll(v3Global.rootp());
if (dumpMore) V3Global::dumpGlobalTree("const_predad.tree");
V3Dead::deadifyAll(v3Global.rootp(), false);
if (dumpMore) V3Global::dumpGlobalTree("const_predead.tree");
V3Dead::deadifyDTypes(v3Global.rootp());
v3Global.checkTree();
V3Global::dumpGlobalTree("const.tree");
@ -402,8 +402,8 @@ void process () {
// Remove unused vars
V3Const::constifyAll(v3Global.rootp());
if (dumpMore) V3Global::dumpGlobalTree("const_predad.tree");
V3Dead::deadifyAll(v3Global.rootp(), true);
if (dumpMore) V3Global::dumpGlobalTree("const_predead.tree");
V3Dead::deadifyAll(v3Global.rootp());
V3Global::dumpGlobalTree("const.tree");
// Clock domain crossing analysis
@ -460,8 +460,8 @@ void process () {
// Remove unused vars
V3Const::constifyAll(v3Global.rootp());
if (dumpMore) V3Global::dumpGlobalTree("const_predad.tree");
V3Dead::deadifyAll(v3Global.rootp(), true);
if (dumpMore) V3Global::dumpGlobalTree("const_predead.tree");
V3Dead::deadifyAll(v3Global.rootp());
V3Global::dumpGlobalTree("const.tree");
#ifndef NEW_ORDERING
@ -514,8 +514,8 @@ void process () {
if (!v3Global.opt.xmlOnly()) {
// Remove unused vars
V3Const::constifyAll(v3Global.rootp());
if (dumpMore) V3Global::dumpGlobalTree("const_predad.tree");
V3Dead::deadifyAll(v3Global.rootp(), true);
if (dumpMore) V3Global::dumpGlobalTree("const_predead.tree");
V3Dead::deadifyAll(v3Global.rootp());
V3Global::dumpGlobalTree("const.tree");
// Here down, widthMin() is the Verilog width, and width() is the C++ width
@ -553,7 +553,7 @@ void process () {
V3Const::constifyCpp(v3Global.rootp());
if (dumpMore) V3Global::dumpGlobalTree("constc.tree");
V3Dead::deadifyAll(v3Global.rootp(), true);
V3Dead::deadifyAll(v3Global.rootp());
V3Global::dumpGlobalTree("dead.tree");
}