From 2704067a714a6a3248a1c76414129a6f8580835e Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Sat, 4 Nov 2023 16:39:33 +0000 Subject: [PATCH] Remove deprecated options --- docs/guide/deprecations.rst | 16 --------- docs/guide/exe_sim.rst | 9 +++-- docs/guide/exe_verilator.rst | 2 +- include/verilated.cpp | 9 ++--- src/V3Options.cpp | 46 ------------------------ test_regress/t/t_flag_deprecated_bad.out | 4 +-- test_regress/t/t_flag_deprecated_bad.pl | 2 +- test_regress/t/t_runflag_bad.pl | 4 +-- test_regress/t/t_runflag_bad_d.out | 2 +- test_regress/t/t_runflag_bad_e.out | 2 +- 10 files changed, 16 insertions(+), 80 deletions(-) diff --git a/docs/guide/deprecations.rst b/docs/guide/deprecations.rst index df4c7d2ac3..15dd7aafa6 100644 --- a/docs/guide/deprecations.rst +++ b/docs/guide/deprecations.rst @@ -21,19 +21,3 @@ C++11 compiler support Verilator currently regresses both 64-bit and 32-bit pointer modes (GCC's `-m64` and `-m32`). Support for 32-bit `-m32` mode will be deprecated no sooner than January 2024. - -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. - -Verilated model options `+verilator+prof+threads+*` - The `+verilator+prof+threads+start`, `+verilator+prof+threads+window` and - `+verilator+prof+threads+file` options have been superseded by the - `+verilator+prof+exec+start`, `+verilator+prof+exec+window` and - `+verilator+prof+exec+file` options respectively and are planned for removal - no sooner than April 2023. diff --git a/docs/guide/exe_sim.rst b/docs/guide/exe_sim.rst index f538d4836b..47f025ff38 100644 --- a/docs/guide/exe_sim.rst +++ b/docs/guide/exe_sim.rst @@ -64,15 +64,18 @@ Summary: .. option:: +verilator+prof+threads+file+ - Deprecated. Alias for :vlopt:`+verilator+prof+exec+file+\` + Removed in 5.020. Was an alias for + :vlopt:`+verilator+prof+exec+file+\` .. option:: +verilator+prof+threads+start+ - Deprecated. Alias for :vlopt:`+verilator+prof+exec+start+\` + Removed in 5.020. Was an alias for + :vlopt:`+verilator+prof+exec+start+\` .. option:: +verilator+prof+threads+window+ - Deprecated. Alias for :vlopt:`+verilator+prof+exec+window+\` + Removed in 5.020. Was an alias for + :vlopt:`+verilator+prof+exec+window+\` .. option:: +verilator+prof+vlt+file+ diff --git a/docs/guide/exe_verilator.rst b/docs/guide/exe_verilator.rst index 644d115576..aed8a4806c 100644 --- a/docs/guide/exe_verilator.rst +++ b/docs/guide/exe_verilator.rst @@ -1036,7 +1036,7 @@ Summary: .. option:: --prof-threads - Deprecated. Same as --prof-exec and --prof-pgo together. + Removed in 5.020. Was an alias for --prof-exec and --prof-pgo together. .. option:: --protect-ids diff --git a/include/verilated.cpp b/include/verilated.cpp index dd574a93e0..07832c3c39 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -2710,14 +2710,11 @@ void VerilatedContextImp::commandArgVl(const std::string& arg) { "Exiting due to command line argument (not an error)"); } else if (arg == "+verilator+noassert") { assertOn(false); - } else if (commandArgVlUint64(arg, "+verilator+prof+exec+start+", u64) - || commandArgVlUint64(arg, "+verilator+prof+threads+start+", u64)) { + } else if (commandArgVlUint64(arg, "+verilator+prof+exec+start+", u64)) { profExecStart(u64); - } else if (commandArgVlUint64(arg, "+verilator+prof+exec+window+", u64, 1) - || commandArgVlUint64(arg, "+verilator+prof+threads+window+", u64, 1)) { + } else if (commandArgVlUint64(arg, "+verilator+prof+exec+window+", u64, 1)) { profExecWindow(u64); - } else if (commandArgVlString(arg, "+verilator+prof+exec+file+", str) - || commandArgVlString(arg, "+verilator+prof+threads+file+", str)) { + } else if (commandArgVlString(arg, "+verilator+prof+exec+file+", str)) { profExecFilename(str); } else if (commandArgVlString(arg, "+verilator+prof+vlt+file+", str)) { profVltFilename(str); diff --git a/src/V3Options.cpp b/src/V3Options.cpp index a39f6e76c5..919aefd96a 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -1330,47 +1330,6 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, 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 = std::isupper(*cp); - switch (std::tolower(*cp)) { - 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 - 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 - } - } - }); DECL_OPTION("-o", Set, &m_exeName); DECL_OPTION("-order-clock-delay", CbOnOff, [fl](bool /*flag*/) { fl->v3warn(DEPRECATED, "Option order-clock-delay is deprecated and has no effect."); @@ -1417,11 +1376,6 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, [this]() { m_profC = m_profCFuncs = true; }); // Renamed DECL_OPTION("-prof-exec", OnOff, &m_profExec); DECL_OPTION("-prof-pgo", OnOff, &m_profPgo); - DECL_OPTION("-prof-threads", CbOnOff, [this, fl](bool flag) { - fl->v3warn(DEPRECATED, "Option --prof-threads is deprecated. " - "Use --prof-exec and --prof-pgo instead."); - m_profExec = m_profPgo = flag; - }); DECL_OPTION("-protect-ids", OnOff, &m_protectIds); DECL_OPTION("-protect-key", Set, &m_protectKey); DECL_OPTION("-protect-lib", CbVal, [this](const char* valp) { diff --git a/test_regress/t/t_flag_deprecated_bad.out b/test_regress/t/t_flag_deprecated_bad.out index e13b7628f1..18d8e3d6f5 100644 --- a/test_regress/t/t_flag_deprecated_bad.out +++ b/test_regress/t/t_flag_deprecated_bad.out @@ -1,7 +1,5 @@ -%Warning-DEPRECATED: Option -O is deprecated. Use -f or -fno- instead. +%Warning-DEPRECATED: Option --trace-fst-thread is deprecated. Use --trace-fst with --trace-threads > 0. ... For warning description see https://verilator.org/warn/DEPRECATED?v=latest ... Use "/* verilator lint_off DEPRECATED */" and lint_on around source to disable this message. -%Warning-DEPRECATED: Option --prof-threads is deprecated. Use --prof-exec and --prof-pgo instead. -%Warning-DEPRECATED: Option --trace-fst-thread is deprecated. Use --trace-fst with --trace-threads > 0. %Warning-DEPRECATED: Option order-clock-delay is deprecated and has no effect. %Error: Exiting due to diff --git a/test_regress/t/t_flag_deprecated_bad.pl b/test_regress/t/t_flag_deprecated_bad.pl index 5edf03bb90..ba2b1d3882 100755 --- a/test_regress/t/t_flag_deprecated_bad.pl +++ b/test_regress/t/t_flag_deprecated_bad.pl @@ -11,7 +11,7 @@ scenarios(vlt => 1); lint( - verilator_flags2 => ["-Ox --prof-threads --trace-fst-thread --order-clock-delay"], + verilator_flags2 => ["--trace-fst-thread --order-clock-delay"], fails => 1, expect_filename => $Self->{golden_filename}, ); diff --git a/test_regress/t/t_runflag_bad.pl b/test_regress/t/t_runflag_bad.pl index 0eeef974cf..d96c0ccbff 100755 --- a/test_regress/t/t_runflag_bad.pl +++ b/test_regress/t/t_runflag_bad.pl @@ -32,13 +32,13 @@ ); execute( - all_run_flags => ["+verilator+prof+threads+window+0"], + all_run_flags => ["+verilator+prof+exec+window+0"], fails => 1, expect_filename => "t/" . $Self->{name} . "_d.out", ); execute( - all_run_flags => ["+verilator+prof+threads+window+1000000000000000000000000"], + all_run_flags => ["+verilator+prof+exec+window+1000000000000000000000000"], fails => 1, expect_filename => "t/" . $Self->{name} . "_e.out", ); diff --git a/test_regress/t/t_runflag_bad_d.out b/test_regress/t/t_runflag_bad_d.out index f46b3bcaa4..8e6705a6c0 100644 --- a/test_regress/t/t_runflag_bad_d.out +++ b/test_regress/t/t_runflag_bad_d.out @@ -1,2 +1,2 @@ -%Error: COMMAND_LINE:0: Argument '+verilator+prof+threads+window+' must be an unsigned integer, greater than 0 +%Error: COMMAND_LINE:0: Argument '+verilator+prof+exec+window+' must be an unsigned integer, greater than 0 Aborting... diff --git a/test_regress/t/t_runflag_bad_e.out b/test_regress/t/t_runflag_bad_e.out index 7ad4052fd7..ed248d4092 100644 --- a/test_regress/t/t_runflag_bad_e.out +++ b/test_regress/t/t_runflag_bad_e.out @@ -1,2 +1,2 @@ -%Error: COMMAND_LINE:0: Argument '+verilator+prof+threads+window+' must be an unsigned integer, greater than 0. Value out of range of uint64_t +%Error: COMMAND_LINE:0: Argument '+verilator+prof+exec+window+' must be an unsigned integer, greater than 0. Value out of range of uint64_t Aborting...