forked from github/verilator
CDC: 'posedge a or posedge b or edge a' should optimize to 'edge a or posedge b'
This commit is contained in:
parent
d1cb3b0d15
commit
43e1b27d16
@ -1167,8 +1167,6 @@ private:
|
||||
const AstSenItem* ritemp = rhsp->castSenItem();
|
||||
if (litemp && ritemp) {
|
||||
// Looks visually better if we keep sorted by name
|
||||
if (litemp->edgeType() < ritemp->edgeType()) return true;
|
||||
if (litemp->edgeType() > ritemp->edgeType()) return false;
|
||||
if (!litemp->varrefp() && ritemp->varrefp()) return true;
|
||||
if ( litemp->varrefp() && !ritemp->varrefp()) return false;
|
||||
if (litemp->varrefp() && ritemp->varrefp()) {
|
||||
@ -1178,6 +1176,10 @@ private:
|
||||
if (litemp->varrefp()->varScopep() < ritemp->varrefp()->varScopep()) return true;
|
||||
if (litemp->varrefp()->varScopep() > ritemp->varrefp()->varScopep()) return false;
|
||||
}
|
||||
// Sort by edge, AFTER variable, as we want multiple edges for same var adjacent
|
||||
// note the SenTree optimizer requires this order (more general firsst, less general last)
|
||||
if (litemp->edgeType() < ritemp->edgeType()) return true;
|
||||
if (litemp->edgeType() > ritemp->edgeType()) return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ void process () {
|
||||
|
||||
// Make large low-fanin logic blocks into lookup tables
|
||||
// This should probably be done much later, once we have common logic elimination.
|
||||
if (v3Global.opt.oTable()) {
|
||||
if (!v3Global.opt.lintOnly() && v3Global.opt.oTable()) {
|
||||
V3Table::tableAll(v3Global.rootp());
|
||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("table.tree"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user