Skip to content

Commit d24c764

Browse files
committed
[DNM] Enable lifetime completion.
1 parent af074a3 commit d24c764

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

include/swift/AST/SILOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class SILOptions {
183183
bool EnableSILOpaqueValues = false;
184184

185185
/// Require linear OSSA lifetimes after SILGen
186-
bool OSSACompleteLifetimes = false;
186+
bool OSSACompleteLifetimes = true;
187187

188188
/// Verify linear OSSA lifetimes after SILGen
189189
bool OSSAVerifyComplete = false;

lib/DriverTool/sil_opt_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ struct SILOptOptions {
231231
llvm::cl::desc("Compile the module with sil-opaque-values enabled."));
232232

233233
llvm::cl::opt<bool>
234-
EnableOSSACompleteLifetimes = llvm::cl::opt<bool>("enable-ossa-complete-lifetimes",
234+
EnableOSSACompleteLifetimes = llvm::cl::opt<bool>("enable-ossa-complete-lifetimes", llvm::cl::init(true),
235235
llvm::cl::desc("Require linear OSSA lifetimes after SILGenCleanup."));
236236
llvm::cl::opt<bool>
237237
EnableOSSAVerifyComplete = llvm::cl::opt<bool>("enable-ossa-verify-complete",

test/AutoDiff/SILOptimizer/activity_analysis.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ func testActiveOptional(_ x: Float) -> Float {
804804
// CHECK: [NONE] // function_ref _diagnoseUnexpectedNilOptional(_filenameStart:_filenameLength:_filenameIsASCII:_line:_isImplicitUnwrap:)
805805
// CHECK: [NONE] %24 = apply %23(%17, %18, %19, %20, %22) : $@convention(thin) (Builtin.RawPointer, Builtin.Word, Builtin.Int1, Builtin.Word, Builtin.Int1) -> ()
806806
// CHECK: bb2:
807-
// CHECK: [ACTIVE] %26 = argument of bb2 : $Float
807+
// CHECK: [ACTIVE] %27 = argument of bb2 : $Float
808808

809809
enum DirectEnum: Differentiable & AdditiveArithmetic {
810810
case case0

test/SILGen/rethrows.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ func test1() throws {
6464
// CHECK-NEXT: [[RESULT:%.*]] = tuple ()
6565
// CHECK-NEXT: return [[RESULT]]
6666
// CHECK: [[ERROR]]([[T0:%.*]] : $any Error):
67+
// CHECK-NEXT: strong_release [[T1]]
68+
// CHECK-NEXT: strong_release [[T0]]
6769
// CHECK-NEXT: unreachable
6870
func test2() {
6971
rethrower(nonthrower)
@@ -78,6 +80,7 @@ func test2() {
7880
// CHECK-NEXT: [[RESULT:%.*]] = tuple ()
7981
// CHECK-NEXT: return [[RESULT]]
8082
// CHECK: [[ERROR]]([[ERROR:%.*]] : $any Error):
83+
// CHECK-NEXT: strong_release [[ERROR]]
8184
// CHECK-NEXT: unreachable
8285
// CHECK-LABEL: // end sil function '$s8rethrows5test3yyF'
8386
func test3() {

0 commit comments

Comments
 (0)