Skip to content

Commit 918c36e

Browse files
committed
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.
1 parent 33d95a3 commit 918c36e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SIL/SILVerifier.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4861,6 +4861,10 @@ void SILFunction::verify(bool SingleFunction) const {
48614861
}
48624862

48634863
void SILFunction::verifyCriticalEdges() const {
4864+
#ifdef NDEBUG
4865+
if (!getModule().getOptions().VerifyAll)
4866+
return;
4867+
#endif
48644868
SILVerifier(*this, /*SingleFunction=*/true).verifyBranches(this);
48654869
}
48664870

0 commit comments

Comments
 (0)