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,
223
223
InlineAdvisor &Advisor = getAdvisor (MAMProxy, FAM, M);
224
224
Advisor.onPassEntry (&InitialC);
225
225
226
- auto AdvisorOnExit = make_scope_exit ([&] { Advisor.onPassExit (&InitialC); });
227
-
228
226
// We use a single common worklist for calls across the entire SCC. We
229
227
// process these in-order and append new calls introduced during inlining to
230
228
// the end. The PriorityInlineOrder is optional here, in which the smaller
@@ -279,12 +277,15 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
279
277
}
280
278
}
281
279
}
282
- if (Calls.empty ())
283
- return PreservedAnalyses::all ();
284
280
285
281
// Capture updatable variable for the current SCC.
286
282
auto *C = &InitialC;
287
283
284
+ auto AdvisorOnExit = make_scope_exit ([&] { Advisor.onPassExit (C); });
285
+
286
+ if (Calls.empty ())
287
+ return PreservedAnalyses::all ();
288
+
288
289
// When inlining a callee produces new call sites, we want to keep track of
289
290
// the fact that they were inlined from the callee. This allows us to avoid
290
291
// infinite inlining in some obscure cases. To represent this, we use an
You can’t perform that action at this time.
0 commit comments