Skip to content

Commit e168290

Browse files
author
Raj Barik
committed
ProtocolDevirtualizer Part 3: Peephole Optimization to Propagate Concrete Types
1 parent b315246 commit e168290

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ SILCombiner::propagateConcreteTypeOfInitExistentialToAllApplyArgs(FullApplySite
11651165
if (!AI.hasSubstitutions())
11661166
return nullptr;
11671167
auto *Callee = AI.getReferencedFunction();
1168-
if (!Callee)
1168+
if (!Callee || !Callee->shouldOptimize() || Callee->empty())
11691169
return nullptr;
11701170

11711171
auto FnTy = AI.getCallee()->getType().castTo<SILFunctionType>();

0 commit comments

Comments
 (0)