Skip to content

Commit 5c72a36

Browse files
committed
SILOptimizer: Add some FIXMEs and a cleanup
1 parent 50d6c30 commit 5c72a36

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

lib/SILOptimizer/IPO/CapturePromotion.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ computeNewArgInterfaceTypes(SILFunction *F,
365365
assert(paramBoxTy->getLayout()->getFields().size() == 1
366366
&& "promoting compound box not implemented yet");
367367
auto paramBoxedTy = paramBoxTy->getFieldType(F->getModule(), 0);
368+
// FIXME: Expansion
368369
auto &paramTL = Types.getTypeLowering(paramBoxedTy,
369370
ResilienceExpansion::Minimal);
370371
ParameterConvention convention;

lib/SILOptimizer/Transforms/ObjectOutliner.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ bool ObjectOutliner::optimizeObjectAllocation(
339339
<< ARI->getFunction()->getName() << '\n');
340340

341341
SILModule *Module = &ARI->getFunction()->getModule();
342+
// FIXME: Expansion
342343
assert(!Cl->isResilient(Module->getSwiftModule(),
343344
ResilienceExpansion::Minimal) &&
344345
"constructor call of resilient class should prevent static allocation");
@@ -448,6 +449,7 @@ void ObjectOutliner::replaceFindStringCall(ApplyInst *FindStringCall) {
448449
return;
449450

450451

452+
// FIXME: Expansion
451453
assert(!cacheDecl->isResilient(Module->getSwiftModule(),
452454
ResilienceExpansion::Minimal));
453455

lib/SILOptimizer/Utils/Devirtualize.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,7 @@ bool swift::canDevirtualizeClassMethod(FullApplySite AI,
695695
}
696696

697697
// We need to disable the “effectively final” opt if a function is inlinable
698-
if (isEffectivelyFinalMethod && AI.getFunction()->getResilienceExpansion() ==
699-
ResilienceExpansion::Minimal) {
698+
if (isEffectivelyFinalMethod && AI.getFunction()->isSerialized()) {
700699
LLVM_DEBUG(llvm::dbgs() << " FAIL: Could not optimize function "
701700
"because it is an effectively-final inlinable: "
702701
<< AI.getFunction()->getName() << "\n");

0 commit comments

Comments
 (0)