From d48d44d22d9b598f43fdb991c3827dcc9fa18ee2 Mon Sep 17 00:00:00 2001 From: Gogul Balakrishnan Date: Mon, 25 Mar 2019 09:05:49 -0700 Subject: [PATCH] Invalidate analysis if we inlined calls during deabstraction. --- lib/SILOptimizer/Mandatory/TFDeabstraction.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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