diff --git a/lib/SILOptimizer/Mandatory/TFDeabstraction.cpp b/lib/SILOptimizer/Mandatory/TFDeabstraction.cpp index 2d1179f2afc1d..1a57601fd4487 100644 --- a/lib/SILOptimizer/Mandatory/TFDeabstraction.cpp +++ b/lib/SILOptimizer/Mandatory/TFDeabstraction.cpp @@ -298,6 +298,11 @@ void TFDeabstraction::inlineCalls() { auto &module = fn.getModule(); module.invalidateSILLoaderCaches(); + if (!inlinedCallees.empty()) { + passManager->invalidateAnalysis( + &fn, SILAnalysis::InvalidationKind::FunctionBody); + } + // Now that we've inlined some functions, clean them up to avoid burning // compile time in later passes. We do this with a simple linear scan, // because functions that reference each other have already been flattened