Allow more variable removal in scoped DFG (#6260)
This commit is contained in:
parent
d2edab458e
commit
78c9e7773a
|
|
@ -87,10 +87,13 @@ public:
|
|||
|
||||
// Variable referenced outside the containing module/netlist.
|
||||
bool hasExtRefs() const {
|
||||
if (m_varp->isIO()) return true; // Ports
|
||||
if (m_varp->isTrace()) return true; // Traced
|
||||
if (m_varp->isForced()) return true; // Forced
|
||||
if (hasXRefs()) return true; // Target of a hierarchical reference
|
||||
// In scoped mode, we can ignrore some of these as they were made explicit by then
|
||||
if (!m_varScopep) {
|
||||
if (m_varp->isIO()) return true; // Ports
|
||||
if (m_varp->isTrace()) return true; // Traced
|
||||
if (m_varp->isForced()) return true; // Forced
|
||||
if (hasXRefs()) return true; // Target of a hierarchical reference
|
||||
}
|
||||
if (m_varp->isPrimaryIO()) return true; // Top level ports
|
||||
if (m_varp->isSigPublic()) return true; // Public
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ test.inline_checks()
|
|||
test.file_grep_not(test.obj_dir + "/coverage.dat", "largeish")
|
||||
|
||||
if test.vlt_all:
|
||||
test.file_grep(test.stats, r'Coverage, Toggle points joined\s+(\d+)', 13)
|
||||
test.file_grep(test.stats, r'Coverage, Toggle points joined\s+(\d+)', 14)
|
||||
|
||||
test.run(cmd=[
|
||||
os.environ["VERILATOR_ROOT"] + "/bin/verilator_coverage",
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ if test.vlt_all:
|
|||
# We expect to combine sequent functions across multiple instances of
|
||||
# l2, l3, l4, l5. If this number drops, please confirm this has not broken.
|
||||
test.file_grep(test.stats, r'Optimizations, Combined CFuncs\s+(\d+)',
|
||||
(91 if test.vltmt else 87))
|
||||
(107 if test.vltmt else 114))
|
||||
|
||||
# Everything should use relative references
|
||||
check_relative_refs("t", True)
|
||||
|
|
|
|||
Loading…
Reference in New Issue