mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 18:13:50 +02:00
Fix display optimization ignoring side effects (#4585).
This commit is contained in:
@@ -3149,6 +3149,8 @@ private:
|
||||
// right line numbers, nor scopeNames as might be different scopes (late in process)
|
||||
if (!m_doCpp && pformatp->exprsp()) return false;
|
||||
if (!m_doCpp && nformatp->exprsp()) return false;
|
||||
if (pformatp->exprsp() && !pformatp->exprsp()->isPureAndNext()) return false;
|
||||
if (nformatp->exprsp() && !nformatp->exprsp()->isPureAndNext()) return false;
|
||||
// Avoid huge merges
|
||||
static constexpr int DISPLAY_MAX_MERGE_LENGTH = 500;
|
||||
if (pformatp->text().length() + nformatp->text().length() > DISPLAY_MAX_MERGE_LENGTH)
|
||||
|
||||
Reference in New Issue
Block a user