Internals: Misc refactoring from dcache branch. No functional change.

This commit is contained in:
Wilson Snyder 2020-12-19 20:46:10 -05:00
parent db276946b4
commit 28ff71b1bf
3 changed files with 13 additions and 2 deletions

View File

@ -1149,14 +1149,19 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
case 'c': m_oConst = flag; break; case 'c': m_oConst = flag; break;
case 'd': m_oDedupe = flag; break; case 'd': m_oDedupe = flag; break;
case 'e': m_oCase = flag; break; case 'e': m_oCase = flag; break;
// f
case 'g': m_oGate = flag; break; case 'g': m_oGate = flag; break;
// h
case 'i': m_oInline = flag; break; case 'i': m_oInline = flag; break;
// j
case 'k': m_oSubstConst = flag; break; case 'k': m_oSubstConst = flag; break;
case 'l': m_oLife = flag; break; case 'l': m_oLife = flag; break;
case 'm': m_oAssemble = flag; break; case 'm': m_oAssemble = flag; break;
// n o
case 'p': case 'p':
m_public = !flag; m_public = !flag;
break; // With -Op so flag=0, we want public on so few optimizations done break; // With -Op so flag=0, we want public on so few optimizations done
// q
case 'r': m_oReorder = flag; break; case 'r': m_oReorder = flag; break;
case 's': m_oSplit = flag; break; case 's': m_oSplit = flag; break;
case 't': m_oLifePost = flag; break; case 't': m_oLifePost = flag; break;

View File

@ -134,7 +134,7 @@ private:
// Need to do even if !m_counting because maybe determining upstream if/else // Need to do even if !m_counting because maybe determining upstream if/else
double ifInstrs = 0.0; double ifInstrs = 0.0;
double elseInstrs = 0.0; double elseInstrs = 0.0;
if (nodep->branchPred() != VBranchPred::BP_UNLIKELY) { // Check if if (!nodep->branchPred().unlikely()) { // Check if
VL_RESTORER(m_instrs); VL_RESTORER(m_instrs);
VL_RESTORER(m_counting); VL_RESTORER(m_counting);
{ {
@ -144,7 +144,7 @@ private:
ifInstrs = m_instrs; ifInstrs = m_instrs;
} }
} }
if (nodep->branchPred() != VBranchPred::BP_LIKELY) { // Check else if (!nodep->branchPred().likely()) { // Check else
VL_RESTORER(m_instrs); VL_RESTORER(m_instrs);
VL_RESTORER(m_counting); VL_RESTORER(m_counting);
{ {

View File

@ -24,6 +24,12 @@
class AstNetlist; class AstNetlist;
#define STAT_ADD_UINFO(level, text, value) \
do { \
UINFO((level), "addStat " << text << " " << value << endl); \
V3Stats::addStat(text, value); \
} while (0)
//============================================================================ //============================================================================
class VDouble0 final { class VDouble0 final {