Fix coverage counts missing due to table optimization (#5473) (#5474).

Co-authored-by: Wilson Snyder <[email protected]>
This commit is contained in:
Vito Gamberini
2024-10-10 21:22:06 -04:00
committed by Wilson Snyder
co-authored by Wilson Snyder
parent 3cced9baad
commit 789698cb5c
8 changed files with 503 additions and 304 deletions
+3
View File
@@ -210,6 +210,9 @@ private:
const double time // max(_, 1), so we won't divide by zero
= std::max<double>(chkvis.instrCount() * TABLE_BYTES_PER_INST + chkvis.dataCount(), 1);
if (chkvis.isImpure()) chkvis.clearOptimizable(nodep, "Table creates side effects");
if (chkvis.isCoverage()) {
chkvis.clearOptimizable(nodep, "Table removes coverage points");
}
if (!m_outWidthBytes || !m_inWidthBits) {
chkvis.clearOptimizable(nodep, "Table has no outputs");
}