v3errorEnd: look for instance only when warning is not ignored (#3632)

This approach reduced total time of V3Undriven stage from 34,2s to 2,5s
in design containing almost 400 000 unused variables.

Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
This commit is contained in:
Kamil Rakoczy 2022-09-21 11:54:23 +02:00 committed by GitHub
parent 5df14627fd
commit 0b07679ff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1212,7 +1212,11 @@ void AstNode::v3errorEnd(std::ostringstream& str) const {
const_cast<AstNode*>(this)->dump(nsstr);
nsstr << endl;
}
m_fileline->v3errorEnd(nsstr, instanceStr());
// Don't look for instance name when warning is disabled.
// In case of large number of warnings, this can
// take significant amount of time
m_fileline->v3errorEnd(nsstr,
m_fileline->warnIsOff(V3Error::errorCode()) ? "" : instanceStr());
}
}