@@ -203,8 +203,8 @@ void LetPropertiesOpt::optimizeLetPropertyAccess(VarDecl *Property,
203
203
};
204
204
205
205
// Look for any instructions accessing let properties.
206
- if (isa<RefElementAddrInst>(Load) || isa<StructElementAddrInst>(Load)
207
- || isa<BeginAccessInst>(Load) || isa<BeginBorrowInst>(Load)) {
206
+ if (isa<RefElementAddrInst>(Load) || isa<StructElementAddrInst>(Load) ||
207
+ isa<BeginAccessInst>(Load) || isa<BeginBorrowInst>(Load)) {
208
208
auto proj = cast<SingleValueInstruction>(Load);
209
209
210
210
// Copy the initializer into the function
@@ -520,8 +520,8 @@ void LetPropertiesOpt::collectPropertyAccess(SILInstruction *I,
520
520
<< *Property << " ':\n " ;
521
521
llvm::dbgs () << " The instructions are:\n " ; I->dumpInContext ());
522
522
523
- if (isa<RefElementAddrInst>(I) || isa<StructElementAddrInst>(I)
524
- || isa<BeginAccessInst>(I) || isa<CopyAddrInst>(I) ||
523
+ if (isa<RefElementAddrInst>(I) || isa<StructElementAddrInst>(I) ||
524
+ isa<BeginAccessInst>(I) || isa<CopyAddrInst>(I) ||
525
525
isa<BeginBorrowInst>(I)) {
526
526
// Check if there is a store to this property.
527
527
auto projection = cast<SingleValueInstruction>(I);
@@ -582,9 +582,6 @@ void LetPropertiesOpt::run(SILModuleTransform *T) {
582
582
// properties.
583
583
bool NonRemovable = !F.shouldOptimize ();
584
584
585
- // // FIXME: We should be able to handle ownership.
586
- // NonRemovable &= !F.hasOwnership();
587
-
588
585
for (auto &BB : F) {
589
586
for (auto &I : BB)
590
587
// Look for any instructions accessing let properties.
0 commit comments