Remove deprecated --no-relative-cfuncs (#3024)

This commit is contained in:
Geza Lore 2021-06-17 04:17:43 +01:00 committed by GitHub
parent 729bd268de
commit 9eafca5e28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 4 additions and 77 deletions

View File

@ -18,6 +18,7 @@ Verilator 4.205 devel
**Minor:**
* Remove deprecated --no-relative-cfuncs option (#3024). [Geza Lore]
* Merge const static data globally into a new constant pool (#3013). [Geza Lore]
* Fix error on unsupported recursive functions (#2957). [Trefor Southwell]

View File

@ -379,7 +379,6 @@ detailed descriptions of these arguments.
-pvalue+<name>=<value> Overwrite toplevel parameter
--quiet-exit Don't print the command on failure
--relative-includes Resolve includes relative to current file
--no-relative-cfuncs Disallow 'this->' in generated functions
--reloop-limit Minimum iterations for forming loops
--report-unoptflat Extra diagnostics for UNOPTFLAT
--rr Run Verilator and record with rr

View File

@ -11,10 +11,6 @@ C++11 compiler support
require C++14 or newer compilers for both compiling Verilator and
compiling Verilated models no sooner than January 2022.
No-Relative-Cfuncs Option
The :vlopt:`--no-relative-cfuncs` option is not be required by any C++11
compliant compiler and is planned for removal no sooner than July 2021.
Inhibit-Sim Option
The :vlopt:`--inhibit-sim` option is planned for removal no sooner than
July 2021.

View File

@ -661,10 +661,6 @@ Summary:
Backward compatible alias for :vlopt:`--pins-bv 33 <--pins-bv>`.
.. option:: --no-relative-cfuncs
Deprecated.
.. option:: --no-skip-identical =item --skip-identical
Rarely needed. Disables or enables skipping execution of Verilator if

View File

@ -145,8 +145,7 @@ void V3CCtors::evalAsserts() {
// if (signal & CONST(upper_non_clean_mask)) { fail; }
AstVarRef* const vrefp
= new AstVarRef(varp->fileline(), varp, VAccess::READ);
vrefp->selfPointer(v3Global.opt.relativeCFuncs() ? "this"
: "vlSymsp->TOPp");
vrefp->selfPointer("this");
AstNode* newp = vrefp;
if (varp->isWide()) {
newp = new AstWordSel(

View File

@ -74,15 +74,10 @@ private:
string descopedSelfPointer(const AstScope* scopep) {
UASSERT(scopep, "Var/Func not scoped");
// It's possible to disable relative references. This is a concession
// to older compilers (gcc < 4.5.x) that don't understand __restrict__
// well and emit extra ld/st to guard against pointer aliasing
// when this-> and vlSyms-> are mixed in the same function.
bool relativeRefOk = v3Global.opt.relativeCFuncs();
//
// Whether to use relative references via 'this->'
bool relativeRefOk = true;
// Static functions can't use this
if (!m_allowThis) relativeRefOk = false;
//
// Class methods need relative
if (m_modp && VN_IS(m_modp, Class)) relativeRefOk = true;

View File

@ -1243,11 +1243,6 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
DECL_OPTION("-quiet-exit", OnOff, &m_quietExit);
DECL_OPTION("-relative-cfuncs", CbOnOff, [this, fl](bool flag) {
m_relativeCFuncs = flag;
if (!m_relativeCFuncs)
fl->v3warn(DEPRECATED, "Deprecated --no-relative-cfuncs, unnecessary with C++11.");
});
DECL_OPTION("-relative-includes", OnOff, &m_relativeIncludes);
DECL_OPTION("-reloop-limit", CbVal, [this, fl](const char* valp) {
m_reloopLimit = std::atoi(valp);

View File

@ -260,7 +260,6 @@ private:
bool m_public = false; // main switch: --public
bool m_publicFlatRW = false; // main switch: --public-flat-rw
bool m_quietExit = false; // main switch: --quiet-exit
bool m_relativeCFuncs = true; // main switch: --relative-cfuncs
bool m_relativeIncludes = false; // main switch: --relative-includes
bool m_reportUnoptflat = false; // main switch: --report-unoptflat
bool m_savable = false; // main switch: --savable
@ -473,7 +472,6 @@ public:
bool ignc() const { return m_ignc; }
bool inhibitSim() const { return m_inhibitSim; }
bool quietExit() const { return m_quietExit; }
bool relativeCFuncs() const { return m_relativeCFuncs; }
bool reportUnoptflat() const { return m_reportUnoptflat; }
bool verilate() const { return m_verilate; }
bool vpi() const { return m_vpi; }

View File

@ -1,52 +0,0 @@
#!/usr/bin/env perl
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2003 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(simulator => 1);
top_filename("t/t_inst_tree.v");
compile(
verilator_flags2 => ['--stats', '-Wno-DEPRECATED', '--norelative-cfuncs',
"$Self->{t_dir}/t_inst_tree_inl0_pub1.vlt",
$Self->wno_unopthreads_for_few_cores()]
);
if ($Self->{vlt_all}) {
# Fewer optimizations than t_inst_tree_inl0_pub1 which allows
# relative CFuncs:
file_grep($Self->{stats}, qr/Optimizations, Combined CFuncs\s+(\d+)/i,
($Self->{vltmt} ? 0 : 31));
# Should not find any 'this->' or 'vlSelf->' except some specific cases
my @files = `ls $Self->{obj_dir}/*.cpp`;
foreach my $file (@files) {
chomp $file;
my $text = file_contents($file);
$text =~ s/(vlSelf|this)->vlSymsp//g;
$text =~ s/vlSelf->.* = VL_RAND_RESET.*;//g;
$text =~ s/vlSelf->__Vm_even_cycle//g;
$text =~ s/vlSelf->__Vm_even_cycle//g;
$text =~ s/vlSelf->__Vm_mtaskstate_(final|\d+)//g;
$text =~ s/vlSelf->__Vm_threadPoolp//g;
if ($text =~ m/this->/ || $text =~ m/vlSelf->/) {
error("$file has unexpected this-> refs when --norelative-cfuncs");
}
}
}
execute(
check_finished => 1,
expect =>
'\] (%m|.*t\.ps): Clocked
',
);
ok(1);
1;