File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -223,8 +223,6 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
223223 InlineAdvisor &Advisor = getAdvisor (MAMProxy, FAM, M);
224224 Advisor.onPassEntry (&InitialC);
225225
226- auto AdvisorOnExit = make_scope_exit ([&] { Advisor.onPassExit (&InitialC); });
227-
228226 // We use a single common worklist for calls across the entire SCC. We
229227 // process these in-order and append new calls introduced during inlining to
230228 // the end. The PriorityInlineOrder is optional here, in which the smaller
@@ -279,12 +277,15 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
279277 }
280278 }
281279 }
282- if (Calls.empty ())
283- return PreservedAnalyses::all ();
284280
285281 // Capture updatable variable for the current SCC.
286282 auto *C = &InitialC;
287283
284+ auto AdvisorOnExit = make_scope_exit ([&] { Advisor.onPassExit (C); });
285+
286+ if (Calls.empty ())
287+ return PreservedAnalyses::all ();
288+
288289 // When inlining a callee produces new call sites, we want to keep track of
289290 // the fact that they were inlined from the callee. This allows us to avoid
290291 // infinite inlining in some obscure cases. To represent this, we use an
You can’t perform that action at this time.
0 commit comments