Eliminate assigned only variables

git-svn-id: file://localhost/svn/verilator/trunk/verilator@797 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder
2006-09-26 17:05:08 +00:00
parent ba7b4f261a
commit ca4e3c1737
3 changed files with 67 additions and 6 deletions
+7
View File
@@ -248,7 +248,13 @@ void process () {
V3Case::caseAll(v3Global.rootp());
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("case.tree"));
// Push constants across variables and remove redundant assignments
V3Const::constifyAll(v3Global.rootp());
if (v3Global.opt.oLife()) {
V3Life::lifeAll(v3Global.rootp());
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("life.tree"));
}
//v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("const.tree"));
// Make large low-fanin logic blocks into lookup tables
@@ -329,6 +335,7 @@ void process () {
// Cleanup any dly vars or other temps that are simple assignments
// Life must be done before Subst, as it assumes each CFunc under _eval is called only once.
if (v3Global.opt.oLife()) {
V3Const::constifyAll(v3Global.rootp());
V3Life::lifeAll(v3Global.rootp());
}
if (v3Global.opt.oLifePost()) {