Skip to content

Commit 7ad1683

Browse files
authored
Merge pull request swiftlang#66005 from kavon/optimize-noncopyables
add optimizations-on variants directly in the noncopyable tests
2 parents 5a28a6d + 37cc8cb commit 7ad1683

16 files changed

+25
-15
lines changed

test/Interpreter/moveonly.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all)
1+
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all)
2+
// this test takes a long time, so run this once with optimizations on.
23

34
// REQUIRES: executable_test
45

test/Interpreter/moveonly_bufferview.swift

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
// TODO: re-enable the simplification passes once rdar://104875010 is fixed
2-
// RUN: %target-run-simple-swift(-Xllvm -sil-disable-pass=simplification) | %FileCheck %s
1+
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all) | %FileCheck %s
2+
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all) | %FileCheck %s
33

44
// REQUIRES: executable_test
5-
// REQUIRES: swift_test_mode_optimize_none
65

7-
// Until we get support for emitting value witnesses for deinits, do not run
8-
// this with optimizations.
9-
10-
@_moveOnly
11-
public struct BufferView<T> {
6+
public struct BufferView<T>: ~Copyable {
127
var ptr: UnsafeBufferPointer<T>
138

149
var count: Int {

test/Interpreter/moveonly_computed_property_in_class.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %target-run-simple-swift
1+
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all)
2+
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all)
3+
24
// REQUIRES: executable_test
35
@_moveOnly
46
struct FileDescriptor {

test/Interpreter/moveonly_consuming_param.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-run-simple-swift | %FileCheck %s
2+
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all) | %FileCheck %s
23

34
// REQUIRES: executable_test
45

test/Interpreter/moveonly_discard.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-feature -Xfrontend MoveOnlyEnumDeinits -Xfrontend -sil-verify-all) | %FileCheck %s --implicit-check-not closing
2+
// RUN: %target-run-simple-swift(-O -Xfrontend -enable-experimental-feature -Xfrontend MoveOnlyEnumDeinits -Xfrontend -sil-verify-all) | %FileCheck %s --implicit-check-not closing
23

34
// REQUIRES: executable_test
45

test/Interpreter/moveonly_escaping_capture_lifetimes.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-move-only) | %FileCheck %s
1+
// RUN: %target-run-simple-swift | %FileCheck %s
2+
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all) | %FileCheck %s
23

34
// REQUIRES: executable_test
45

test/Interpreter/moveonly_escaping_definite_initialization.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-run-simple-swift | %FileCheck %s
2+
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all) | %FileCheck %s
23

34
// REQUIRES: executable_test
45

test/Interpreter/moveonly_field_in_class_reflection.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-move-only)
2+
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -Xfrontend -enable-experimental-move-only)
23
// REQUIRES: executable_test
34

45
// Verify that iterating through the fields of an object whose class has

test/SILGen/moveonly_deinits.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-swift-emit-silgen -enable-experimental-feature MoveOnlyEnumDeinits %s | %FileCheck -check-prefix=SILGEN %s
22
// RUN: %target-swift-emit-sil -enable-experimental-feature MoveOnlyEnumDeinits %s | %FileCheck -check-prefix=SIL %s
3+
// RUN: %target-swift-emit-sil -O -sil-verify-all -enable-experimental-feature MoveOnlyEnumDeinits %s
34

45
// Test that makes sure that throughout the pipeline we properly handle
56
// conditional releases for trivial and non-trivial move only types.

test/SILGen/moveonly_enum_literal.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s
2+
// RUN: %target-swift-frontend -emit-sil -O -sil-verify-all %s
23

34
// This test makes sure that we properly setup enums when we construct moveonly
45
// enums from literals.

0 commit comments

Comments
 (0)