Skip to content

Commit 9f89000

Browse files
committed
[SIL] Disable optimizations that aren't ready for indirect error results
1 parent 489158c commit 9f89000

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/SILOptimizer/FunctionSignatureTransforms/FunctionSignatureOpts.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ static bool canSpecializeFunction(SILFunction *F,
114114
if (F->getConventions().hasIndirectSILResults())
115115
return false;
116116

117+
// For now ignore functions with indirect error results.
118+
if (F->getConventions().hasIndirectSILErrorResults())
119+
return false;
120+
117121
// For now ignore coroutines.
118122
if (F->getLoweredFunctionType()->isCoroutine())
119123
return false;

lib/SILOptimizer/Utils/Generics.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,10 @@ bool ReabstractionInfo::prepareAndCheck(ApplySite Apply, SILFunction *Callee,
517517
if (shouldNotSpecialize(Callee, Apply ? Apply.getFunction() : nullptr))
518518
return false;
519519

520+
// FIXME: Specialization with typed throws.
521+
if (Callee->getConventions().hasIndirectSILErrorResults())
522+
return false;
523+
520524
SpecializedGenericEnv = nullptr;
521525
SpecializedGenericSig = nullptr;
522526
auto CalleeGenericSig = Callee->getLoweredFunctionType()

0 commit comments

Comments
 (0)