File tree Expand file tree Collapse file tree 2 files changed +0
-61
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 2 files changed +0
-61
lines changed Original file line number Diff line number Diff line change @@ -526,15 +526,6 @@ bool SILPerformanceInliner::isProfitableToInline(
526
526
return true ;
527
527
}
528
528
529
- static bool returnsClosure (SILFunction *F) {
530
- for (SILBasicBlock &BB : *F) {
531
- if (auto *RI = dyn_cast<ReturnInst>(BB.getTerminator ())) {
532
- return isa<PartialApplyInst>(RI->getOperand ());
533
- }
534
- }
535
- return false ;
536
- }
537
-
538
529
// / Checks if a given generic apply should be inlined unconditionally, i.e.
539
530
// / without any complex analysis using e.g. a cost model.
540
531
// / It returns true if a function should be inlined.
@@ -579,13 +570,6 @@ static Optional<bool> shouldInlineGeneric(FullApplySite AI) {
579
570
return None;
580
571
}
581
572
582
- // The returned partial_apply of a thunk is most likely being optimized away
583
- // if inlined. Because some thunks cannot be specialized (e.g. if an opened
584
- // existential is in the subsitution list), we inline such thunks also in case
585
- // they are generic.
586
- if (Callee->isThunk () && returnsClosure (Callee))
587
- return true ;
588
-
589
573
// All other generic functions should not be inlined if this kind of inlining
590
574
// is disabled.
591
575
if (!EnableSILInliningOfGenerics)
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments