mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
EagerSpecializer: only run SIL verification when needed
This was running the SIL verifier in the asserts build unconditionally on every function even if this pass did nothing.
This commit is contained in:
@@ -888,7 +888,11 @@ void EagerSpecializerTransform::run() {
|
||||
// removed.
|
||||
for (auto *SA : attrsToRemove)
|
||||
F.removeSpecializeAttr(SA);
|
||||
F.verify();
|
||||
|
||||
// If any specializations were created, reverify the original body now that it
|
||||
// has checks.
|
||||
if (!newFunctions.empty())
|
||||
F.verify();
|
||||
|
||||
for (SILFunction *newF : newFunctions) {
|
||||
addFunctionToPassManagerWorklist(newF, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user