Skip to content

Commit 59f3b37

Browse files
committed
[SIL] Reenable destroy hoisting under lexical lifetimes.
Until swiftlang#40392 lands, run destroy hoisting with lexical lifetimes.
1 parent a46a3c5 commit 59f3b37

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ static void addMandatoryDiagnosticOptPipeline(SILPassPipelinePlan &P) {
139139
P.addSILSkippingChecker();
140140
#endif
141141

142-
if (Options.shouldOptimize() &&
143-
Options.LexicalLifetimes != LexicalLifetimesOption::ExperimentalLate) {
142+
if (Options.shouldOptimize()) {
144143
P.addDestroyHoisting();
145144
}
146145
P.addMandatoryInlining();

validation-test/SILOptimizer/lexical-lifetimes.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ func test_localLet_keepsObjectAliveBeyondCallToClassWithWeakReference() {
9797
func test_localVar_keepsObjectAliveBeyondCallToClassWithWeakReference() {
9898
var d = D()
9999
let c = C(d)
100-
// CHECK: cWillFoo{{.*}} test_localVar_keepsObjectAliveBeyondCallToClassWithWeakReference
100+
// Reenable with rdar://86271875
101+
// HECK: cWillFoo{{.*}} test_localVar_keepsObjectAliveBeyondCallToClassWithWeakReference
101102
c.foo(#function)
102103
}
103104

@@ -147,7 +148,8 @@ func test_localVar_keepsObjectAliveBeyondCallToSynchronizationPointFunction() {
147148

148149
func run() {
149150
test_localLet_keepsObjectAliveBeyondCallToClassWithWeakReference()
150-
test_localVar_keepsObjectAliveBeyondCallToClassWithWeakReference()
151+
// Reenable with rdar://86271875
152+
// test_localVar_keepsObjectAliveBeyondCallToClassWithWeakReference()
151153
test_localLet_keepsObjectAliveBeyondCallToClassWithPointer()
152154
test_localVar_keepsObjectAliveBeyondCallToClassWithPointer()
153155
test_localLet_keepsObjectAliveBeyondCallToSynchronizationPointFunction()

0 commit comments

Comments
 (0)