diff --git a/Changes b/Changes index ec20c6fda..bfbc7dc92 100644 --- a/Changes +++ b/Changes @@ -17,6 +17,7 @@ Verilator 4.223 devel **Minor:** +* Add -f options to replace -O options (#3436). * Changed --no-merge-const-pool to -fno-merge-const-pool (#3436). * Support compile time trace signal selection with tracing_on/off (#3323). [Shunyao CAD] * Add assert when VerilatedContext is mis-deleted (#3121). [Rupert Swarbrick] diff --git a/bin/verilator b/bin/verilator index 367651d32..f04e2a593 100755 --- a/bin/verilator +++ b/bin/verilator @@ -319,7 +319,7 @@ detailed descriptions of these arguments. -f Parse arguments from a file -FI Force include of a file --flatten Force inlining of all modules, tasks and functions - --fno-merge-const-pool Disable merging of different types in const pool + --fno- Disable internal optimization stage -G= Overwrite top-level parameter --gdb Run Verilator under GDB interactively --gdbbt Run Verilator under GDB for backtrace diff --git a/docs/guide/deprecations.rst b/docs/guide/deprecations.rst index 33c2ef610..4c2d96592 100644 --- a/docs/guide/deprecations.rst +++ b/docs/guide/deprecations.rst @@ -20,6 +20,11 @@ Option `--cdc` The experimental `--cdc` option is believed to be generally unused and is planned for removal no sooner than January 2023. +Option `--O` + The debug `--O` options have been replaced with + `--fno-` debug options to match GCC. The old options are + planned for removal no sooner than June 2023. + Option `--prof-threads` The `--prof-threads` option has been superseded by the `--prof-exec` and `--prof-pgo` options and is planned for removal no sooner than April 2023. diff --git a/docs/guide/exe_verilator.rst b/docs/guide/exe_verilator.rst index 70b3752ad..fda5aedb3 100644 --- a/docs/guide/exe_verilator.rst +++ b/docs/guide/exe_verilator.rst @@ -431,13 +431,51 @@ Summary: flattening large designs may require significant CPU time, memory and storage. +.. option:: --fno-acyc-simp + +.. option:: --fno-assemble + +.. option:: --fno-case + +.. option:: --fno-combine + +.. option:: --fno-const + +.. option:: --fno-const-bit-op-tree + +.. option:: --fno-dedup + +.. option:: --fno-expand + +.. option:: --fno-gate + +.. option:: --fno-inline + +.. option:: --fno-life + +.. option:: --fno-life-post + +.. option:: --fno-localize + +.. option:: --fno-merge-cond + .. option:: --fno-merge-const-pool - Rarely needed; only use if recommended by maintainers. In order to - minimize cache footprint, values of different data type, that are yet - emitted identically in C++ are merged in the constant pool. This option - disables this and causes every constant pool entry with a distinct data - type to be emitted separately. +.. option:: --fno-reloop + +.. option:: --fno-reorder + +.. option:: --fno-split + +.. option:: --fno-subst + +.. option:: --fno-subst-const + +.. option:: --fno-table + + Rarely needed. Disables one of the internal optimization steps. These + are typically used only when recommended by a maintainer to help debug + or work around an issue. .. option:: -G= @@ -704,9 +742,9 @@ Summary: Rarely needed. Enables or disables a specific optimizations, with the optimization selected based on the letter passed. A lowercase letter - disables an optimization, an upper case letter enables it. This is - intended for debugging use only; see the source code for - version-dependent mappings of optimizations to -O letters. + disables an optimization, an upper case letter enables it. This option + is deprecated and the various `-f` arguments should be + used instead. .. option:: -o diff --git a/src/V3Case.cpp b/src/V3Case.cpp index 161f7db7e..c65fb3e7d 100644 --- a/src/V3Case.cpp +++ b/src/V3Case.cpp @@ -496,7 +496,7 @@ private: V3Case::caseLint(nodep); iterateChildren(nodep); if (debug() >= 9) nodep->dumpTree(cout, " case_old: "); - if (isCaseTreeFast(nodep) && v3Global.opt.oCase()) { + if (isCaseTreeFast(nodep) && v3Global.opt.fCase()) { // It's a simple priority encoder or complete statement // we can make a tree of statements to avoid extra comparisons ++m_statCaseFast; diff --git a/src/V3Const.cpp b/src/V3Const.cpp index 9f39e2884..e246180a2 100644 --- a/src/V3Const.cpp +++ b/src/V3Const.cpp @@ -1090,7 +1090,7 @@ private: bool matchBitOpTree(AstNode* nodep) { if (nodep->widthMin() != 1) return false; - if (!v3Global.opt.oConstBitOpTree()) return false; + if (!v3Global.opt.fConstBitOpTree()) return false; string debugPrefix; if (debug() >= 9) { // LCOV_EXCL_START @@ -1412,7 +1412,7 @@ private: return (VN_IS(nodep, And) || VN_IS(nodep, Or) || VN_IS(nodep, Xor)); } bool ifAdjacentSel(const AstSel* lhsp, const AstSel* rhsp) { - if (!v3Global.opt.oAssemble()) return false; // opt disabled + if (!v3Global.opt.fAssemble()) return false; // opt disabled if (!lhsp || !rhsp) return false; const AstNode* const lfromp = lhsp->fromp(); const AstNode* const rfromp = rhsp->fromp(); @@ -1427,7 +1427,7 @@ private: } bool ifMergeAdjacent(AstNode* lhsp, AstNode* rhsp) { // called by concatmergeable to determine if {lhsp, rhsp} make sense - if (!v3Global.opt.oAssemble()) return false; // opt disabled + if (!v3Global.opt.fAssemble()) return false; // opt disabled // two same varref if (operandsSame(lhsp, rhsp)) return true; const AstSel* lselp = VN_CAST(lhsp, Sel); @@ -1464,7 +1464,7 @@ private: } bool concatMergeable(const AstNode* lhsp, const AstNode* rhsp, unsigned depth) { // determine if {a OP b, c OP d} => {a, c} OP {b, d} is advantageous - if (!v3Global.opt.oAssemble()) return false; // opt disabled + if (!v3Global.opt.fAssemble()) return false; // opt disabled if (lhsp->type() != rhsp->type()) return false; if (!ifConcatMergeableBiop(lhsp)) return false; if (depth > CONCAT_MERGABLE_MAX_DEPTH) return false; // As worse case O(n^2) algorithm @@ -2550,7 +2550,7 @@ private: if (nodep->access().isReadOnly() && ((!m_params // Can reduce constant wires into equations && m_doNConst - && v3Global.opt.oConst() + && v3Global.opt.fConst() // Default value, not a "known" constant for this usage && !nodep->varp()->isClassMember() && !(nodep->varp()->isFuncLocal() && nodep->varp()->isNonOutput()) diff --git a/src/V3Gate.cpp b/src/V3Gate.cpp index 4b66c2661..cf3485121 100644 --- a/src/V3Gate.cpp +++ b/src/V3Gate.cpp @@ -397,11 +397,11 @@ private: // Then propagate more complicated equations optimizeSignals(true); // Remove redundant logic - if (v3Global.opt.oDedupe()) { + if (v3Global.opt.fDedupe()) { dedupe(); if (debug() >= 6) m_graph.dumpDotFilePrefixed("gate_dedup"); } - if (v3Global.opt.oAssemble()) { + if (v3Global.opt.fAssemble()) { mergeAssigns(); if (debug() >= 6) m_graph.dumpDotFilePrefixed("gate_assm"); } diff --git a/src/V3GraphAcyc.cpp b/src/V3GraphAcyc.cpp index a62fd3d9d..0df758ed1 100644 --- a/src/V3GraphAcyc.cpp +++ b/src/V3GraphAcyc.cpp @@ -254,7 +254,7 @@ void GraphAcyc::simplify(bool allowCut) { if (allowCut) { // The main algorithm works without these, though slower // So if changing the main algorithm, comment these out for a test run - if (v3Global.opt.oAcycSimp()) { + if (v3Global.opt.fAcycSimp()) { cutBasic(vertexp); cutBackward(vertexp); } diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 2a4c3050d..7d4b1e846 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -1082,7 +1082,28 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char parseOptsFile(fl, parseFileArg(optdir, valp), false); }); DECL_OPTION("-flatten", OnOff, &m_flatten); + + DECL_OPTION("-facyc-simp", FOnOff, &m_fAcycSimp); + DECL_OPTION("-fassemble", FOnOff, &m_fAssemble); + DECL_OPTION("-fcase", FOnOff, &m_fCase); + DECL_OPTION("-fcombine", FOnOff, &m_fCombine); + DECL_OPTION("-fconst", FOnOff, &m_fConst); + DECL_OPTION("-fconst-bit-op-tree", FOnOff, &m_fConstBitOpTree); + DECL_OPTION("-fdedup", FOnOff, &m_fDedupe); + DECL_OPTION("-fexpand", FOnOff, &m_fExpand); + DECL_OPTION("-fgate", FOnOff, &m_fGate); + DECL_OPTION("-finline", FOnOff, &m_fInline); + DECL_OPTION("-flife", FOnOff, &m_fLife); + DECL_OPTION("-flife-post", FOnOff, &m_fLifePost); + DECL_OPTION("-flocalize", FOnOff, &m_fLocalize); + DECL_OPTION("-fmerge-cond", FOnOff, &m_fMergeCond); DECL_OPTION("-fmerge-const-pool", FOnOff, &m_fMergeConstPool); + DECL_OPTION("-freloop", FOnOff, &m_fReloop); + DECL_OPTION("-freorder", FOnOff, &m_fReorder); + DECL_OPTION("-fsplit", FOnOff, &m_fSplit); + DECL_OPTION("-fsubst", FOnOff, &m_fSubst); + DECL_OPTION("-fsubst-const", FOnOff, &m_fSubstConst); + DECL_OPTION("-ftable", FOnOff, &m_fTable); DECL_OPTION("-G", CbPartialMatch, [this](const char* optp) { addParameter(optp, false); }); DECL_OPTION("-gate-stmts", Set, &m_gateStmts); @@ -1155,47 +1176,49 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char DECL_OPTION("-max-num-width", Set, &m_maxNumWidth); DECL_OPTION("-mod-prefix", Set, &m_modPrefix); - DECL_OPTION("-O", CbPartialMatch, [this](const char* optp) { - // Optimization + DECL_OPTION("-O0", CbCall, [this]() { optimize(0); }); + DECL_OPTION("-O1", CbCall, [this]() { optimize(1); }); + DECL_OPTION("-O2", CbCall, [this]() { optimize(2); }); + DECL_OPTION("-O3", CbCall, [this]() { optimize(3); }); + + DECL_OPTION("-O", CbPartialMatch, [this, fl](const char* optp) { + // Optimization, e.g. -O1rX + // LCOV_EXCL_START + fl->v3warn(DEPRECATED, "Option -O is deprecated. " + "Use -f or -fno- instead."); for (const char* cp = optp; *cp; ++cp) { const bool flag = isupper(*cp); switch (tolower(*cp)) { - case '0': optimize(0); break; // 0=all off - case '1': optimize(1); break; // 1=all on - case '2': optimize(2); break; // 2=not used - case '3': optimize(3); break; // 3=high - case 'a': m_oTable = flag; break; - case 'b': m_oCombine = flag; break; - case 'c': m_oConst = flag; break; - case 'd': m_oDedupe = flag; break; - case 'e': m_oCase = flag; break; - // f - case 'g': m_oGate = flag; break; - // h - case 'i': m_oInline = flag; break; - // j - case 'k': m_oSubstConst = flag; break; - case 'l': m_oLife = flag; break; - case 'm': m_oAssemble = flag; break; - // n - case 'o': - m_oConstBitOpTree = flag; - break; // Can remove ~2022-01 when stable - // o will be used as an escape for a second character of optimization disables + case '0': optimize(0); break; + case '1': optimize(1); break; + case '2': optimize(2); break; + case '3': optimize(3); break; + case 'a': m_fTable = flag; break; // == -fno-table + case 'b': m_fCombine = flag; break; // == -fno-combine + case 'c': m_fConst = flag; break; // == -fno-const + case 'd': m_fDedupe = flag; break; // == -fno-dedup + case 'e': m_fCase = flag; break; // == -fno-case + case 'g': m_fGate = flag; break; // == -fno-gate + case 'i': m_fInline = flag; break; // == -fno-inline + case 'k': m_fSubstConst = flag; break; // == -fno-subst-const + case 'l': m_fLife = flag; break; // == -fno-life + case 'm': m_fAssemble = flag; break; // == -fno-assemble + case 'o': m_fConstBitOpTree = flag; break; // == -fno-const-bit-op-tree case 'p': m_public = !flag; break; // With -Op so flag=0, we want public on so few optimizations done - // q - case 'r': m_oReorder = flag; break; - case 's': m_oSplit = flag; break; - case 't': m_oLifePost = flag; break; - case 'u': m_oSubst = flag; break; - case 'v': m_oReloop = flag; break; - case 'w': m_oMergeCond = flag; break; - case 'x': m_oExpand = flag; break; - case 'y': m_oAcycSimp = flag; break; - case 'z': m_oLocalize = flag; break; - default: break; // No error, just ignore + case 'r': m_fReorder = flag; break; // == -fno-reorder + case 's': m_fSplit = flag; break; // == -fno-split + case 't': m_fLifePost = flag; break; // == -fno-life-post + case 'u': m_fSubst = flag; break; // == -fno-subst + case 'v': m_fReloop = flag; break; // == -fno-reloop + case 'w': m_fMergeCond = flag; break; // == -fno-merge-cond + case 'x': m_fExpand = flag; break; // == -fno-expand + case 'y': m_fAcycSimp = flag; break; // == -fno-acyc-simp + case 'z': m_fLocalize = flag; break; // == -fno-localize + default: + break; // No error, just ignore + // LCOV_EXCL_STOP } } }); @@ -1787,26 +1810,26 @@ int V3Options::dumpTreeLevel(const string& srcfile_path) { void V3Options::optimize(int level) { // Set all optimizations to on/off const bool flag = level > 0; - m_oAcycSimp = flag; - m_oAssemble = flag; - m_oCase = flag; - m_oCombine = flag; - m_oConst = flag; - m_oConstBitOpTree = flag; - m_oDedupe = flag; - m_oExpand = flag; - m_oGate = flag; - m_oInline = flag; - m_oLife = flag; - m_oLifePost = flag; - m_oLocalize = flag; - m_oMergeCond = flag; - m_oReloop = flag; - m_oReorder = flag; - m_oSplit = flag; - m_oSubst = flag; - m_oSubstConst = flag; - m_oTable = flag; + m_fAcycSimp = flag; + m_fAssemble = flag; + m_fCase = flag; + m_fCombine = flag; + m_fConst = flag; + m_fConstBitOpTree = flag; + m_fDedupe = flag; + m_fExpand = flag; + m_fGate = flag; + m_fInline = flag; + m_fLife = flag; + m_fLifePost = flag; + m_fLocalize = flag; + m_fMergeCond = flag; + m_fReloop = flag; + m_fReorder = flag; + m_fSplit = flag; + m_fSubst = flag; + m_fSubstConst = flag; + m_fTable = flag; // And set specific optimization levels if (level >= 3) { m_inlineMult = -1; // Maximum inlining diff --git a/src/V3Options.h b/src/V3Options.h index e1756ab3d..137580c34 100644 --- a/src/V3Options.h +++ b/src/V3Options.h @@ -239,7 +239,6 @@ private: bool m_dumpDefines = false; // main switch: --dump-defines bool m_dumpTreeAddrids = false; // main switch: --dump-tree-addrids bool m_exe = false; // main switch: --exe - bool m_fMergeConstPool = true; // main switch: --fmerge-const-pool bool m_flatten = false; // main switch: --flatten bool m_hierarchical = false; // main switch: --hierarchical bool m_hierChild = false; // main switch: --hierarchical-child @@ -341,27 +340,27 @@ private: V3LangCode m_defaultLanguage; // main switch: --language // MEMBERS (optimizations) - // // main switch: -Op: --public - bool m_oAcycSimp; // main switch: -Oy: acyclic pre-optimizations - bool m_oAssemble; // main switch: -Om: assign assemble - bool m_oCase; // main switch: -Oe: case tree conversion - bool m_oCombine; // main switch: -Ob: common icode packing - bool m_oConst; // main switch: -Oc: constant folding - bool m_oConstBitOpTree; // main switch: -Oo: constant bit op tree - bool m_oDedupe; // main switch: -Od: logic deduplication - bool m_oExpand; // main switch: -Ox: expansion of C macros - bool m_oGate; // main switch: -Og: gate wire elimination - bool m_oInline; // main switch: -Oi: module inlining - bool m_oLife; // main switch: -Ol: variable lifetime - bool m_oLifePost; // main switch: -Ot: delayed assignment elimination - bool m_oLocalize; // main switch: -Oz: convert temps to local variables - bool m_oMergeCond; // main switch: -Ob: merge conditionals - bool m_oReloop; // main switch: -Ov: reform loops - bool m_oReorder; // main switch: -Or: reorder assignments in blocks - bool m_oSplit; // main switch: -Os: always assignment splitting - bool m_oSubst; // main switch: -Ou: substitute expression temp values - bool m_oSubstConst; // main switch: -Ok: final constant substitution - bool m_oTable; // main switch: -Oa: lookup table creation + bool m_fAcycSimp; // main switch: -fno-acyc-simp: acyclic pre-optimizations + bool m_fAssemble; // main switch: -fno-assemble: assign assemble + bool m_fCase; // main switch: -fno-case: case tree conversion + bool m_fCombine; // main switch: -fno-combine: common icode packing + bool m_fConst; // main switch: -fno-const: constant folding + bool m_fConstBitOpTree; // main switch: -fno-const-bit-op-tree constant bit op tree + bool m_fDedupe; // main switch: -fno-dedupe: logic deduplication + bool m_fExpand; // main switch: -fno-expand: expansion of C macros + bool m_fGate; // main switch: -fno-gate: gate wire elimination + bool m_fInline; // main switch: -fno-inline: module inlining + bool m_fLife; // main switch: -fno-life: variable lifetime + bool m_fLifePost; // main switch: -fno-life-post: delayed assignment elimination + bool m_fLocalize; // main switch: -fno-localize: convert temps to local variables + bool m_fMergeCond; // main switch: -fno-merge-cond: merge conditionals + bool m_fMergeConstPool = true; // main switch: --fmerge-const-pool + bool m_fReloop; // main switch: -fno-reloop: reform loops + bool m_fReorder; // main switch: -fno-reorder: reorder assignments in blocks + bool m_fSplit; // main switch: -fno-split: always assignment splitting + bool m_fSubst; // main switch: -fno-subst: substitute expression temp values + bool m_fSubstConst; // main switch: -fno-subst-const: final constant substitution + bool m_fTable; // main switch: -fno-table: lookup table creation // clang-format on bool m_available = false; // Set to true at the end of option parsing @@ -448,7 +447,6 @@ public: bool dpiHdrOnly() const { return m_dpiHdrOnly; } bool dumpDefines() const { return m_dumpDefines; } bool exe() const { return m_exe; } - bool fMergeConstPool() const { return m_fMergeConstPool; } bool flatten() const { return m_flatten; } bool gmake() const { return m_gmake; } bool threadsDpiPure() const { return m_threadsDpiPure; } @@ -575,26 +573,27 @@ public: bool isNoClocker(const string& signame) const; // ACCESSORS (optimization options) - bool oAcycSimp() const { return m_oAcycSimp; } - bool oAssemble() const { return m_oAssemble; } - bool oCase() const { return m_oCase; } - bool oCombine() const { return m_oCombine; } - bool oConst() const { return m_oConst; } - bool oConstBitOpTree() const { return m_oConstBitOpTree; } - bool oDedupe() const { return m_oDedupe; } - bool oExpand() const { return m_oExpand; } - bool oGate() const { return m_oGate; } - bool oInline() const { return m_oInline; } - bool oLife() const { return m_oLife; } - bool oLifePost() const { return m_oLifePost; } - bool oLocalize() const { return m_oLocalize; } - bool oMergeCond() const { return m_oMergeCond; } - bool oReloop() const { return m_oReloop; } - bool oReorder() const { return m_oReorder; } - bool oSplit() const { return m_oSplit; } - bool oSubst() const { return m_oSubst; } - bool oSubstConst() const { return m_oSubstConst; } - bool oTable() const { return m_oTable; } + bool fAcycSimp() const { return m_fAcycSimp; } + bool fAssemble() const { return m_fAssemble; } + bool fCase() const { return m_fCase; } + bool fCombine() const { return m_fCombine; } + bool fConst() const { return m_fConst; } + bool fConstBitOpTree() const { return m_fConstBitOpTree; } + bool fDedupe() const { return m_fDedupe; } + bool fExpand() const { return m_fExpand; } + bool fGate() const { return m_fGate; } + bool fInline() const { return m_fInline; } + bool fLife() const { return m_fLife; } + bool fLifePost() const { return m_fLifePost; } + bool fLocalize() const { return m_fLocalize; } + bool fMergeCond() const { return m_fMergeCond; } + bool fMergeConstPool() const { return m_fMergeConstPool; } + bool fReloop() const { return m_fReloop; } + bool fReorder() const { return m_fReorder; } + bool fSplit() const { return m_fSplit; } + bool fSubst() const { return m_fSubst; } + bool fSubstConst() const { return m_fSubstConst; } + bool fTable() const { return m_fTable; } string traceClassBase() const { return m_traceFormat.classBase(); } string traceClassLang() const { return m_traceFormat.classBase() + (systemC() ? "Sc" : "C"); } diff --git a/src/Verilator.cpp b/src/Verilator.cpp index e233a041c..97e3393c4 100644 --- a/src/Verilator.cpp +++ b/src/Verilator.cpp @@ -239,7 +239,7 @@ static void process() { // Module inlining // Cannot remove dead variables after this, as alias information for final // V3Scope's V3LinkDot is in the AstVar. - if (v3Global.opt.oInline()) { + if (v3Global.opt.fInline()) { V3Inline::inlineAll(v3Global.rootp()); V3LinkDot::linkDotArrayed(v3Global.rootp()); // Cleanup as made new modules } @@ -310,11 +310,11 @@ static void process() { // Push constants across variables and remove redundant assignments V3Const::constifyAll(v3Global.rootp()); - if (v3Global.opt.oLife()) V3Life::lifeAll(v3Global.rootp()); + if (v3Global.opt.fLife()) V3Life::lifeAll(v3Global.rootp()); // 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.lintOnly() && v3Global.opt.oTable()) { + if (!v3Global.opt.lintOnly() && v3Global.opt.fTable()) { V3Table::tableAll(v3Global.rootp()); } @@ -328,7 +328,7 @@ static void process() { V3Active::activeAll(v3Global.rootp()); // Split single ALWAYS blocks into multiple blocks for better ordering chances - if (v3Global.opt.oSplit()) V3Split::splitAlwaysAll(v3Global.rootp()); + if (v3Global.opt.fSplit()) V3Split::splitAlwaysAll(v3Global.rootp()); V3SplitAs::splitAsAll(v3Global.rootp()); // Create tracing sample points, before we start eliminating signals @@ -340,11 +340,11 @@ static void process() { // Gate-based logic elimination; eliminate signals and push constant across cell boundaries // Instant propagation makes lots-o-constant reduction possibilities. - if (v3Global.opt.oGate()) { + if (v3Global.opt.fGate()) { V3Gate::gateAll(v3Global.rootp()); // V3Gate calls constant propagation itself. } else { - v3info("Command Line disabled gate optimization with -Og/-O0. " + v3info("Command Line disabled gate optimization with -fno-gate. " "This may cause ordering problems."); } @@ -363,7 +363,7 @@ static void process() { } // Reorder assignments in pipelined blocks - if (v3Global.opt.oReorder()) V3Split::splitReorderAll(v3Global.rootp()); + if (v3Global.opt.fReorder()) V3Split::splitReorderAll(v3Global.rootp()); // Create delayed assignments // This creates lots of duplicate ACTIVES so ActiveTop needs to be after this step @@ -388,11 +388,11 @@ static 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()) { + if (v3Global.opt.fLife()) { V3Const::constifyAll(v3Global.rootp()); V3Life::lifeAll(v3Global.rootp()); } - if (v3Global.opt.oLifePost()) V3LifePost::lifepostAll(v3Global.rootp()); + if (v3Global.opt.fLifePost()) V3LifePost::lifepostAll(v3Global.rootp()); // Remove unused vars V3Const::constifyAll(v3Global.rootp()); @@ -422,13 +422,13 @@ static void process() { v3Global.assertScoped(false); // Move variables from modules to function local variables where possible - if (v3Global.opt.oLocalize()) V3Localize::localizeAll(v3Global.rootp()); + if (v3Global.opt.fLocalize()) V3Localize::localizeAll(v3Global.rootp()); // Remove remaining scopes; make varrefs/funccalls relative to current module V3Descope::descopeAll(v3Global.rootp()); // Icache packing; combine common code in each module's functions into subroutines - if (v3Global.opt.oCombine()) V3Combine::combineAll(v3Global.rootp()); + if (v3Global.opt.fCombine()) V3Combine::combineAll(v3Global.rootp()); } V3Error::abortIfErrors(); @@ -452,30 +452,30 @@ static void process() { } // Expand macros and wide operators into C++ primitives - if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly() && v3Global.opt.oExpand()) { + if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly() && v3Global.opt.fExpand()) { V3Expand::expandAll(v3Global.rootp()); } // Propagate constants across WORDSEL arrayed temporaries - if (!v3Global.opt.xmlOnly() && v3Global.opt.oSubst()) { + if (!v3Global.opt.xmlOnly() && v3Global.opt.fSubst()) { // Constant folding of expanded stuff V3Const::constifyCpp(v3Global.rootp()); V3Subst::substituteAll(v3Global.rootp()); } - if (!v3Global.opt.xmlOnly() && v3Global.opt.oSubstConst()) { + if (!v3Global.opt.xmlOnly() && v3Global.opt.fSubstConst()) { // Constant folding of substitutions V3Const::constifyCpp(v3Global.rootp()); V3Dead::deadifyAll(v3Global.rootp()); } if (!v3Global.opt.lintOnly() && !v3Global.opt.xmlOnly()) { - if (v3Global.opt.oMergeCond()) { + if (v3Global.opt.fMergeCond()) { // Merge conditionals V3MergeCond::mergeAll(v3Global.rootp()); } - if (v3Global.opt.oReloop()) { + if (v3Global.opt.fReloop()) { // Reform loops to reduce code size // Must be after all Sel/array index based optimizations V3Reloop::reloopAll(v3Global.rootp()); diff --git a/test_regress/driver.pl b/test_regress/driver.pl index fbae94f92..541fb296f 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -77,7 +77,6 @@ my $opt_gdbbt; my $opt_gdbsim; my $opt_hashset; my $opt_jobs = 1; -my $opt_optimize; my $opt_quiet; my $opt_rerun; my $opt_rrsim; @@ -104,7 +103,6 @@ if (! GetOptions( "hashset=s" => \$opt_hashset, "help" => \&usage, "j=i" => \$opt_jobs, - "optimize:s" => \$opt_optimize, "quiet!" => \$opt_quiet, "rerun!" => \$opt_rerun, "rr!" => \$opt_rr, @@ -661,7 +659,7 @@ sub new { verilator_define => 'VERILATOR', verilator_flags => ["-cc", "-Mdir $self->{obj_dir}", - "-OD", # As currently disabled unless -O3 + "--fdedup", # As currently disabled unless -O3 "--debug-check", "--comp-limit-members 10", ], verilator_flags2 => [], @@ -934,19 +932,6 @@ sub compile_vlt_flags { $param{make_main} && $param{verilator_make_gmake}; unshift @verilator_flags, "../" . $self->{main_filename} if $param{make_main} && $param{verilator_make_gmake}; - if (defined $opt_optimize) { - my $letters = ""; - if ($opt_optimize =~ /[a-zA-Z]/) { - $letters = $opt_optimize; - } else { # Randomly turn on/off different optimizations - foreach my $l ('a' .. 'z') { - $letters .= ((rand() > 0.5) ? $l : uc $l); - } - unshift @verilator_flags, "--trace" if rand() > 0.5; - unshift @verilator_flags, "--coverage" if rand() > 0.5; - } - unshift @verilator_flags, "--O" . $letters; - } my @cmdargs = ( "--prefix " . $param{VM_PREFIX}, @@ -2906,11 +2891,6 @@ Displays this message and program version and exits. Run number of parallel tests, or 0 to determine the count based on the number of cores installed. Requires Perl's Parallel::Forker package. -=item --optimize - -Randomly turn on/off different optimizations. With specific flags, -use those optimization settings - =item --quiet Suppress all output except for failures and progress messages every 15 diff --git a/test_regress/t/t_altera_lpm_mult_noinl.pl b/test_regress/t/t_altera_lpm_mult_noinl.pl index 2eac39a3a..63f8aa315 100755 --- a/test_regress/t/t_altera_lpm_mult_noinl.pl +++ b/test_regress/t/t_altera_lpm_mult_noinl.pl @@ -15,7 +15,7 @@ top_filename("t/t_altera_lpm.v"); $module =~ s/_noinl//; compile( - verilator_flags2 => ["--top-module ${module}", "-Oi"] + verilator_flags2 => ["--top-module ${module}", "-fno-inline"] ); ok(1); diff --git a/test_regress/t/t_alw_noreorder.pl b/test_regress/t/t_alw_noreorder.pl index 46d021e6b..edc2a6f7b 100755 --- a/test_regress/t/t_alw_noreorder.pl +++ b/test_regress/t/t_alw_noreorder.pl @@ -12,7 +12,7 @@ scenarios(vlt_all => 1); top_filename("t/t_alw_reorder.v"); compile( - verilator_flags2 => ["--stats -Or"], + verilator_flags2 => ["--stats -fno-reorder"], ); file_grep($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/i, 0); diff --git a/test_regress/t/t_assign_inline.pl b/test_regress/t/t_assign_inline.pl index 27414cae0..1683d1777 100755 --- a/test_regress/t/t_assign_inline.pl +++ b/test_regress/t/t_assign_inline.pl @@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); compile( - verilator_flags2 => ["-O0 -OG"], + verilator_flags2 => ["-O0 -fgate"], ); execute( diff --git a/test_regress/t/t_assign_slice_overflow_ox.pl b/test_regress/t/t_assign_slice_overflow_ox.pl index 5251be495..8702b94fe 100755 --- a/test_regress/t/t_assign_slice_overflow_ox.pl +++ b/test_regress/t/t_assign_slice_overflow_ox.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t_assign_slice_overflow.v"); compile( - verilator_flags2 => ["-Ox"], + verilator_flags2 => ["-fno-expand"], ); execute( diff --git a/test_regress/t/t_case_66bits_noexpand.pl b/test_regress/t/t_case_66bits_noexpand.pl index fae2f640f..738da6174 100755 --- a/test_regress/t/t_case_66bits_noexpand.pl +++ b/test_regress/t/t_case_66bits_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_case_66bits.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_case_incrdecr.pl b/test_regress/t/t_case_incrdecr.pl index abbcf936a..729c0cc8a 100755 --- a/test_regress/t/t_case_incrdecr.pl +++ b/test_regress/t/t_case_incrdecr.pl @@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); compile( - verilator_flags2 => ["--trace --Os -x-assign 0"], + verilator_flags2 => ["--trace --fno-split -x-assign 0"], ); execute( diff --git a/test_regress/t/t_case_write1_noexpand.pl b/test_regress/t/t_case_write1_noexpand.pl index cadb667e6..48c57c39a 100755 --- a/test_regress/t/t_case_write1_noexpand.pl +++ b/test_regress/t/t_case_write1_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_case_write1.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_const_no_opt.pl b/test_regress/t/t_const_no_opt.pl index 33be39810..79bc15076 100755 --- a/test_regress/t/t_const_no_opt.pl +++ b/test_regress/t/t_const_no_opt.pl @@ -13,7 +13,7 @@ top_filename("t/t_const_opt.v"); # Run the same design as t_const_opt.pl without bitopt tree optimization to make sure that the result is same. compile( - verilator_flags2 => ["-Wno-UNOPTTHREADS", "--stats", "-Oo", "$Self->{t_dir}/t_const_opt.cpp"], + verilator_flags2 => ["-Wno-UNOPTTHREADS", "--stats", "-fno-const-bit-op-tree", "$Self->{t_dir}/t_const_opt.cpp"], ); execute( diff --git a/test_regress/t/t_emit_constw.pl b/test_regress/t/t_emit_constw.pl index 9b1487fcd..8f7895804 100755 --- a/test_regress/t/t_emit_constw.pl +++ b/test_regress/t/t_emit_constw.pl @@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); compile( - verilator_flags2 => ['--Ox'], + verilator_flags2 => ['--fno-expand'], ); execute( diff --git a/test_regress/t/t_func_twocall_noexpand.pl b/test_regress/t/t_func_twocall_noexpand.pl index 001824bc6..452d4b37a 100755 --- a/test_regress/t/t_func_twocall_noexpand.pl +++ b/test_regress/t/t_func_twocall_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_func_twocall.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_gen_genblk_noinl.pl b/test_regress/t/t_gen_genblk_noinl.pl index 7574a1cfb..ef537cd4d 100755 --- a/test_regress/t/t_gen_genblk_noinl.pl +++ b/test_regress/t/t_gen_genblk_noinl.pl @@ -16,7 +16,7 @@ scenarios(simulator => 1); $Self->{sim_time} = 11000; compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_incr_void.pl b/test_regress/t/t_incr_void.pl index 5b95e5b74..e7d3e18e3 100755 --- a/test_regress/t/t_incr_void.pl +++ b/test_regress/t/t_incr_void.pl @@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); compile( - verilator_flags2 => ["--Os -x-assign 0"], + verilator_flags2 => ["--fno-split -x-assign 0"], ); execute( diff --git a/test_regress/t/t_inst_slice_noinl.pl b/test_regress/t/t_inst_slice_noinl.pl index 11f75c752..aa56e6155 100755 --- a/test_regress/t/t_inst_slice_noinl.pl +++ b/test_regress/t/t_inst_slice_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_inst_slice.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface1_modport_noinl.pl b/test_regress/t/t_interface1_modport_noinl.pl index b077bef4e..4f4b314ae 100755 --- a/test_regress/t/t_interface1_modport_noinl.pl +++ b/test_regress/t/t_interface1_modport_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface1_modport.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface1_noinl.pl b/test_regress/t/t_interface1_noinl.pl index 3c9d8d316..867b1e993 100755 --- a/test_regress/t/t_interface1_noinl.pl +++ b/test_regress/t/t_interface1_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface1.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface2_noinl.pl b/test_regress/t/t_interface2_noinl.pl index 57b72e7a7..cad1b6e3d 100755 --- a/test_regress/t/t_interface2_noinl.pl +++ b/test_regress/t/t_interface2_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface2.v"); compile( - verilator_flags2 => ["--top-module t -Oi"], + verilator_flags2 => ["--top-module t -fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_array2_noinl.pl b/test_regress/t/t_interface_array2_noinl.pl index ad389d0fb..7bf1518f5 100755 --- a/test_regress/t/t_interface_array2_noinl.pl +++ b/test_regress/t/t_interface_array2_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_array2.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_array_noinl.pl b/test_regress/t/t_interface_array_noinl.pl index 02bf8fd89..df71f77e9 100755 --- a/test_regress/t/t_interface_array_noinl.pl +++ b/test_regress/t/t_interface_array_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_array.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_down_noinl.pl b/test_regress/t/t_interface_down_noinl.pl index fb03fc988..34ce5cb69 100755 --- a/test_regress/t/t_interface_down_noinl.pl +++ b/test_regress/t/t_interface_down_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_down.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen10_noinl.pl b/test_regress/t/t_interface_gen10_noinl.pl index e5c3f22c5..f691c6d0a 100755 --- a/test_regress/t/t_interface_gen10_noinl.pl +++ b/test_regress/t/t_interface_gen10_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen10.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen11_noinl.pl b/test_regress/t/t_interface_gen11_noinl.pl index 82a6a9a27..d1e7dd3c0 100755 --- a/test_regress/t/t_interface_gen11_noinl.pl +++ b/test_regress/t/t_interface_gen11_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen11.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen12_noinl.pl b/test_regress/t/t_interface_gen12_noinl.pl index c3f59ba19..8ebecd448 100755 --- a/test_regress/t/t_interface_gen12_noinl.pl +++ b/test_regress/t/t_interface_gen12_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen12.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen2_noinl.pl b/test_regress/t/t_interface_gen2_noinl.pl index fc7c4bfb1..eb772bab6 100755 --- a/test_regress/t/t_interface_gen2_noinl.pl +++ b/test_regress/t/t_interface_gen2_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen2.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen3_noinl.pl b/test_regress/t/t_interface_gen3_noinl.pl index e49dfc39a..b63c72eb9 100755 --- a/test_regress/t/t_interface_gen3_noinl.pl +++ b/test_regress/t/t_interface_gen3_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen3.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen4_noinl.pl b/test_regress/t/t_interface_gen4_noinl.pl index 4a0b00930..e724c2859 100755 --- a/test_regress/t/t_interface_gen4_noinl.pl +++ b/test_regress/t/t_interface_gen4_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen4.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen5_noinl.pl b/test_regress/t/t_interface_gen5_noinl.pl index 0873ce9c5..5b4852691 100755 --- a/test_regress/t/t_interface_gen5_noinl.pl +++ b/test_regress/t/t_interface_gen5_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen5.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen6_noinl.pl b/test_regress/t/t_interface_gen6_noinl.pl index 4c42c6797..e43d9460a 100755 --- a/test_regress/t/t_interface_gen6_noinl.pl +++ b/test_regress/t/t_interface_gen6_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen6.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen7_noinl.pl b/test_regress/t/t_interface_gen7_noinl.pl index 27cb3ea61..458c5f0f6 100755 --- a/test_regress/t/t_interface_gen7_noinl.pl +++ b/test_regress/t/t_interface_gen7_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen7.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen8_noinl.pl b/test_regress/t/t_interface_gen8_noinl.pl index ba3b2b132..644d9a10e 100755 --- a/test_regress/t/t_interface_gen8_noinl.pl +++ b/test_regress/t/t_interface_gen8_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen8.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen9_noinl.pl b/test_regress/t/t_interface_gen9_noinl.pl index 48f4eb8be..6ac0d6296 100755 --- a/test_regress/t/t_interface_gen9_noinl.pl +++ b/test_regress/t/t_interface_gen9_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen9.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_gen_noinl.pl b/test_regress/t/t_interface_gen_noinl.pl index 5813d42eb..17273106f 100755 --- a/test_regress/t/t_interface_gen_noinl.pl +++ b/test_regress/t/t_interface_gen_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_gen.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_inl.pl b/test_regress/t/t_interface_inl.pl index efb67ed7f..08dfa385c 100755 --- a/test_regress/t/t_interface_inl.pl +++ b/test_regress/t/t_interface_inl.pl @@ -14,7 +14,7 @@ top_filename("t/t_interface.v"); compile( # Avoid inlining so we find bugs in the non-inliner connection code - verilator_flags2 => ["-Oi"], + verilator_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_modport_import_noinl.pl b/test_regress/t/t_interface_modport_import_noinl.pl index 3821fef11..a9e97bee1 100755 --- a/test_regress/t/t_interface_modport_import_noinl.pl +++ b/test_regress/t/t_interface_modport_import_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_modport_import.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_modport_inl.pl b/test_regress/t/t_interface_modport_inl.pl index 9afcd9cdd..eb2ca2181 100755 --- a/test_regress/t/t_interface_modport_inl.pl +++ b/test_regress/t/t_interface_modport_inl.pl @@ -14,7 +14,7 @@ top_filename("t/t_interface_modport.v"); compile( # Avoid inlining so we find bugs in the non-inliner connection code - verilator_flags2 => ["-Oi"], + verilator_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_modport_noinl.pl b/test_regress/t/t_interface_modport_noinl.pl index 4c051df1a..7f1015d23 100755 --- a/test_regress/t/t_interface_modport_noinl.pl +++ b/test_regress/t/t_interface_modport_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_modport.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_mp_func_noinl.pl b/test_regress/t/t_interface_mp_func_noinl.pl index 432a7308a..89f4835b5 100755 --- a/test_regress/t/t_interface_mp_func_noinl.pl +++ b/test_regress/t/t_interface_mp_func_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_mp_func.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_nest_noinl.pl b/test_regress/t/t_interface_nest_noinl.pl index 9d88a39a0..e042d33c1 100755 --- a/test_regress/t/t_interface_nest_noinl.pl +++ b/test_regress/t/t_interface_nest_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_nest.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_noinl.pl b/test_regress/t/t_interface_noinl.pl index 52cb09c98..7be6235ad 100755 --- a/test_regress/t/t_interface_noinl.pl +++ b/test_regress/t/t_interface_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_interface_twod_noinl.pl b/test_regress/t/t_interface_twod_noinl.pl index 18f0adf62..e77089cb0 100755 --- a/test_regress/t/t_interface_twod_noinl.pl +++ b/test_regress/t/t_interface_twod_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_interface_twod.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_lint_setout_bad_noinl.pl b/test_regress/t/t_lint_setout_bad_noinl.pl index 4b5131821..cbbf96bb4 100755 --- a/test_regress/t/t_lint_setout_bad_noinl.pl +++ b/test_regress/t/t_lint_setout_bad_noinl.pl @@ -13,7 +13,7 @@ scenarios(linter => 1); top_filename("t/t_lint_setout_bad.v"); lint( - verilator_flags2 => ["--lint-only -Oi"], + verilator_flags2 => ["--lint-only -fno-inline"], fails => 1, expect_filename => $Self->{golden_filename}, ); diff --git a/test_regress/t/t_math_cond_huge_noexpand.pl b/test_regress/t/t_math_cond_huge_noexpand.pl index 0ae4e3ce4..15399cb9f 100755 --- a/test_regress/t/t_math_cond_huge_noexpand.pl +++ b/test_regress/t/t_math_cond_huge_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_math_cond_huge.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_math_div_noexpand.pl b/test_regress/t/t_math_div_noexpand.pl index 4dbcba15c..fa7ecd2ec 100755 --- a/test_regress/t/t_math_div_noexpand.pl +++ b/test_regress/t/t_math_div_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_math_div.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_math_eq_noexpand.pl b/test_regress/t/t_math_eq_noexpand.pl index f8b2375c0..2c3907b70 100755 --- a/test_regress/t/t_math_eq_noexpand.pl +++ b/test_regress/t/t_math_eq_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_math_eq.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_math_red_noexpand.pl b/test_regress/t/t_math_red_noexpand.pl index 89e54c0c9..655ce0246 100755 --- a/test_regress/t/t_math_red_noexpand.pl +++ b/test_regress/t/t_math_red_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_math_red.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_math_shift_noexpand.pl b/test_regress/t/t_math_shift_noexpand.pl index e8a59556b..8584197a0 100755 --- a/test_regress/t/t_math_shift_noexpand.pl +++ b/test_regress/t/t_math_shift_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_math_shift.v"); compile( - verilator_flags2 => ["-Wno-CLKDATA", '-Ox'], + verilator_flags2 => ["-Wno-CLKDATA", '-fno-expand'], ); execute( diff --git a/test_regress/t/t_math_signed_noexpand.pl b/test_regress/t/t_math_signed_noexpand.pl index 336d35594..b086af557 100755 --- a/test_regress/t/t_math_signed_noexpand.pl +++ b/test_regress/t/t_math_signed_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_math_signed.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_math_vliw_noexpand.pl b/test_regress/t/t_math_vliw_noexpand.pl index fce202e04..5ca1e425f 100755 --- a/test_regress/t/t_math_vliw_noexpand.pl +++ b/test_regress/t/t_math_vliw_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_math_vliw.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_mem_multi_io.pl b/test_regress/t/t_mem_multi_io.pl index 1691d75f1..4e371f1d7 100755 --- a/test_regress/t/t_mem_multi_io.pl +++ b/test_regress/t/t_mem_multi_io.pl @@ -12,7 +12,7 @@ scenarios(simulator => 1); compile( # Disable inlining, this test is trivial without it - verilator_flags2 => ["-Oi --trace"], + verilator_flags2 => ["-fno-inline --trace"], verilator_flags3 => [], ); diff --git a/test_regress/t/t_mem_multi_io2_cc.pl b/test_regress/t/t_mem_multi_io2_cc.pl index 3edda698b..bfd551aed 100755 --- a/test_regress/t/t_mem_multi_io2_cc.pl +++ b/test_regress/t/t_mem_multi_io2_cc.pl @@ -15,7 +15,7 @@ top_filename("t/t_mem_multi_io2.v"); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp -Oi"], + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp -fno-inline"], verilator_flags3 => [], ); diff --git a/test_regress/t/t_mem_multi_io2_sc.pl b/test_regress/t/t_mem_multi_io2_sc.pl index 11ae8cbfc..2fb4bf70c 100755 --- a/test_regress/t/t_mem_multi_io2_sc.pl +++ b/test_regress/t/t_mem_multi_io2_sc.pl @@ -15,7 +15,7 @@ top_filename("t/t_mem_multi_io2.v"); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp --sc -Oi"], + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io2.cpp --sc -fno-inline"], ); execute( diff --git a/test_regress/t/t_mem_multi_io3_cc.pl b/test_regress/t/t_mem_multi_io3_cc.pl index 4ad019dbf..b6090a775 100755 --- a/test_regress/t/t_mem_multi_io3_cc.pl +++ b/test_regress/t/t_mem_multi_io3_cc.pl @@ -15,7 +15,7 @@ top_filename("t/t_mem_multi_io3.v"); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io3.cpp -Oi"], + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io3.cpp -fno-inline"], verilator_flags3 => [], ); diff --git a/test_regress/t/t_mem_multi_io3_sc.pl b/test_regress/t/t_mem_multi_io3_sc.pl index 5825c7845..f37d9dedd 100755 --- a/test_regress/t/t_mem_multi_io3_sc.pl +++ b/test_regress/t/t_mem_multi_io3_sc.pl @@ -15,7 +15,7 @@ top_filename("t/t_mem_multi_io3.v"); compile( make_top_shell => 0, make_main => 0, - verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io3.cpp --sc -Oi"], + verilator_flags2 => ["--exe $Self->{t_dir}/t_mem_multi_io3.cpp --sc -fno-inline"], verilator_flags3 => [], ); diff --git a/test_regress/t/t_mem_multidim_Ox.pl b/test_regress/t/t_mem_multidim_Ox.pl index bb4dbc122..ccde0bbbd 100755 --- a/test_regress/t/t_mem_multidim_Ox.pl +++ b/test_regress/t/t_mem_multidim_Ox.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_mem_multidim.v"); compile( - verilator_flags2 => ['--Ox'], + verilator_flags2 => ['--fno-expand'], ); execute( diff --git a/test_regress/t/t_mem_packed_noexpand.pl b/test_regress/t/t_mem_packed_noexpand.pl index d5fc2b5da..df4c82d6d 100755 --- a/test_regress/t/t_mem_packed_noexpand.pl +++ b/test_regress/t/t_mem_packed_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_mem_packed.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute( diff --git a/test_regress/t/t_mod_interface_array0_noinl.pl b/test_regress/t/t_mod_interface_array0_noinl.pl index 3c74fd016..56032e0d9 100755 --- a/test_regress/t/t_mod_interface_array0_noinl.pl +++ b/test_regress/t/t_mod_interface_array0_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_mod_interface_array0.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_mod_interface_array1_noinl.pl b/test_regress/t/t_mod_interface_array1_noinl.pl index 34871282a..651bb1c65 100755 --- a/test_regress/t/t_mod_interface_array1_noinl.pl +++ b/test_regress/t/t_mod_interface_array1_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_mod_interface_array1.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_mod_interface_array2_noinl.pl b/test_regress/t/t_mod_interface_array2_noinl.pl index c19612e57..2afa9e020 100755 --- a/test_regress/t/t_mod_interface_array2_noinl.pl +++ b/test_regress/t/t_mod_interface_array2_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_mod_interface_array2.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_mod_interface_array4_noinl.pl b/test_regress/t/t_mod_interface_array4_noinl.pl index 6797c1016..62ad2ca24 100755 --- a/test_regress/t/t_mod_interface_array4_noinl.pl +++ b/test_regress/t/t_mod_interface_array4_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_mod_interface_array4.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_mod_interface_array6_noinl.pl b/test_regress/t/t_mod_interface_array6_noinl.pl index 5244ac42c..f07ea1917 100755 --- a/test_regress/t/t_mod_interface_array6_noinl.pl +++ b/test_regress/t/t_mod_interface_array6_noinl.pl @@ -13,7 +13,7 @@ scenarios(simulator => 1); top_filename("t/t_mod_interface_array6.v"); compile( - v_flags2 => ["-Oi"], + v_flags2 => ["-fno-inline"], ); execute( diff --git a/test_regress/t/t_optm_if_cond.pl b/test_regress/t/t_optm_if_cond.pl index b67f09305..7910f570f 100755 --- a/test_regress/t/t_optm_if_cond.pl +++ b/test_regress/t/t_optm_if_cond.pl @@ -11,7 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(vlt => 1); compile( - verilator_flags2 => ['--stats', "-Ow"], + verilator_flags2 => ['--stats', "-fno-merge-cond"], ); if ($Self->{vlt_all}) { diff --git a/test_regress/t/t_var_assign_landr_noexpand.pl b/test_regress/t/t_var_assign_landr_noexpand.pl index cd058334d..e616f77c3 100755 --- a/test_regress/t/t_var_assign_landr_noexpand.pl +++ b/test_regress/t/t_var_assign_landr_noexpand.pl @@ -13,7 +13,7 @@ scenarios(vlt => 1); top_filename("t/t_var_assign_landr.v"); compile( - verilator_flags2 => ['-Ox'], + verilator_flags2 => ['-fno-expand'], ); execute(