mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user