Guard verifyCriticalEdges with #ifndef NDEBUG.

This could noticeably improve compile time in Release builds.

Once we eliminate all calls to splitAllCriticalEdges, the we can even
remove this verification in asserts builds since normal SIL
verification will catch the issues.
This commit is contained in:
Andrew Trick
2018-08-30 16:34:48 -07:00
parent 33d95a3d22
commit 918c36e154

View File

@@ -4861,6 +4861,10 @@ void SILFunction::verify(bool SingleFunction) const {
}
void SILFunction::verifyCriticalEdges() const {
#ifdef NDEBUG
if (!getModule().getOptions().VerifyAll)
return;
#endif
SILVerifier(*this, /*SingleFunction=*/true).verifyBranches(this);
}