Skip to content

Commit a079a21

Browse files
committed
Formatting fix
1 parent 53a8347 commit a079a21

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/SILOptimizer/IPO/LetPropertiesOpts.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ void LetPropertiesOpt::optimizeLetPropertyAccess(VarDecl *Property,
203203
};
204204

205205
// 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)) {
208208
auto proj = cast<SingleValueInstruction>(Load);
209209

210210
// Copy the initializer into the function
@@ -520,8 +520,8 @@ void LetPropertiesOpt::collectPropertyAccess(SILInstruction *I,
520520
<< *Property << "':\n";
521521
llvm::dbgs() << "The instructions are:\n"; I->dumpInContext());
522522

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) ||
525525
isa<BeginBorrowInst>(I)) {
526526
// Check if there is a store to this property.
527527
auto projection = cast<SingleValueInstruction>(I);
@@ -582,9 +582,6 @@ void LetPropertiesOpt::run(SILModuleTransform *T) {
582582
// properties.
583583
bool NonRemovable = !F.shouldOptimize();
584584

585-
// // FIXME: We should be able to handle ownership.
586-
// NonRemovable &= !F.hasOwnership();
587-
588585
for (auto &BB : F) {
589586
for (auto &I : BB)
590587
// Look for any instructions accessing let properties.

0 commit comments

Comments
 (0)