Skip to content

test: provide an opaque-values testing mode #83622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions test/ASTGen/exprs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// RUN: %target-run-simple-swift(-target %target-swift-5.1-abi-triple -enable-experimental-feature OldOwnershipOperatorSpellings -enable-experimental-feature ParserASTGen)

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: swift_swift_parser
// REQUIRES: swift_feature_ParserASTGen
// REQUIRES: swift_feature_OldOwnershipOperatorSpellings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
// RUN: %target-run %t/a.out %t/%target-library-name(external)

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

import _Differentiation
import external
Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/stdlib/anydifferentiable.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

import _Differentiation
import StdlibUnittest
Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/stdlib/derivative_customization.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

import DifferentiationUnittest
import StdlibUnittest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

// Would fail due to unavailability of swift_autoDiffCreateLinearMapContext.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// RUN: %empty-directory(%t)

// RUN: %target-build-swift-dylib(%t/%target-library-name(MultiModuleProtocol1)) %S/Inputs/MultiModuleProtocol/file1.swift \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// RUN: %empty-directory(%t)

// RUN: %target-build-swift-dylib(%t/%target-library-name(MultiModuleStruct1)) %S/Inputs/MultiModuleStruct/file1.swift \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// RUN: %empty-directory(%t)

// RUN: %target-build-swift-dylib(%t/%target-library-name(MultiModuleStruct1)) %S/Inputs/MultiModuleStruct/file1.swift \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// RUN: %empty-directory(%t)

// RUN: %target-build-swift-dylib(%t/%target-library-name(MultiModuleStruct1)) %S/Inputs/MultiModuleStruct/file1.swift \
Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/validation-test/array.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

// Would fail due to unavailability of swift_autoDiffCreateLinearMapContext.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// NOTE: Verify whether forward-mode differentiation crashes. It currently does.
// RUN: not --crash %target-swift-frontend -enable-experimental-forward-mode-differentiation -emit-sil %s
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

import StdlibUnittest
import DifferentiationUnittest
Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/validation-test/custom_derivatives.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

import StdlibUnittest
#if canImport(Darwin)
Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/validation-test/forward_mode_simple.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-forward-mode-differentiation)
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

import StdlibUnittest
import DifferentiationUnittest
Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/validation-test/inout_parameters.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

// Would fail due to unavailability of swift_autoDiffCreateLinearMapContext.

Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/validation-test/issue-58353.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

// https://github.com/apple/swift/issues/58353

Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/validation-test/property_wrappers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// TODO(TF-1254): Support and test forward-mode differentiation.
// TODO(TF-1254): %target-run-simple-swift(-Xfrontend -enable-experimental-forward-mode-differentiation)
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

import StdlibUnittest
import DifferentiationUnittest
Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/validation-test/reabstraction.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

import _Differentiation
import StdlibUnittest
Expand Down
1 change: 1 addition & 0 deletions test/AutoDiff/validation-test/storeborrow.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

import StdlibUnittest
import DifferentiationUnittest
Expand Down
1 change: 1 addition & 0 deletions test/Backtracing/Crash.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// UNSUPPORTED: back_deployment_runtime
// UNSUPPORTED: asan
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: backtracing
// REQUIRES: OS=macosx || OS=linux-gnu

Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ set(profdata_merge_worker

set(TEST_MODES
optimize_none optimize optimize_unchecked optimize_size
optimize_none_with_opaque_values
optimize_none_with_implicit_dynamic
optimize_with_implicit_dynamic
only_executable only_non_executable
Expand Down
1 change: 1 addition & 0 deletions test/Casting/Casts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// RUN: %target-run %t/a.swift5.O.out
//
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// UNSUPPORTED: use_os_stdlib
// UNSUPPORTED: back_deployment_runtime
Expand Down
1 change: 1 addition & 0 deletions test/Casting/ParameterizedExistentials.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
// RUN: %target-run %t/a.swift5.O.out
//
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// This test requires the new existential shape metadata accessors which are
// not available in on-device runtimes, or in the back-deployment runtime.
// UNSUPPORTED: use_os_stdlib
Expand Down
1 change: 1 addition & 0 deletions test/ClangImporter/enum-error-execute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// RUN: %target-run %t/a.out | %FileCheck %s

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: OS=macosx

import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %target-run %t/a.out | %FileCheck %s

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: concurrency_runtime

Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/Runtime/actor_keypaths.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift( -target %target-swift-5.1-abi-triple)

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: concurrency_runtime
// UNSUPPORTED: back_deployment_runtime
Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/Runtime/async_parameter_pack.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift( -target %target-swift-5.9-abi-triple)
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency

protocol P {
Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/Runtime/async_sequence.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift( -target %target-swift-5.1-abi-triple -parse-as-library)

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency

// REQUIRES: concurrency_runtime
Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/Runtime/async_stream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

// REQUIRES: concurrency
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency_runtime

// rdar://78109470
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library )

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: libdispatch

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library )

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: libdispatch

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library )

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: libdispatch

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: libdispatch
// REQUIRES: concurrency_runtime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking -parse-as-library) | %FileCheck %s --dump-input=always
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: concurrency_runtime

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking -target %target-swift-5.1-abi-triple %import-libdispatch) | %FileCheck %s
// REQUIRES: concurrency
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

// rdar://76038845
// REQUIRES: concurrency_runtime
Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/Runtime/class_resilience.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// RUN: %target-run %t/main %t/%target-library-name(resilient_class)

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// UNSUPPORTED: freestanding

Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/Runtime/custom_main_executor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

// REQUIRES: concurrency
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

// rdar://106849189 move-only types should be supported in freestanding mode
// UNSUPPORTED: freestanding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

// REQUIRES: concurrency
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

// rdar://106849189 move-only types should be supported in freestanding mode
// UNSUPPORTED: freestanding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

// REQUIRES: concurrency
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

// rdar://106849189 move-only types should be supported in freestanding mode
// UNSUPPORTED: freestanding
Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/Runtime/isolated_conformance.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift(-target %target-swift-5.1-abi-triple) | %FileCheck %s

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: concurrency_runtime
// UNSUPPORTED: back_deployment_runtime
Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/async_task_base_priority.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift( %import-libdispatch -parse-as-library )

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: libdispatch

Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/async_task_escalate_priority.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

// REQUIRES: VENDOR=apple
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: libdispatch

Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/async_task_priority.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

// REQUIRES: VENDOR=apple
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: libdispatch

Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/throwing.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %target-run-simple-swift( -target %target-swift-5.1-abi-triple -parse-as-library)

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// UNSUPPORTED: freestanding

Expand Down
1 change: 1 addition & 0 deletions test/Concurrency/voucher_propagation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: MallocStackLogging=1 %target-run %t/voucher_propagation

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency

// Use objc_interop as a proxy for voucher support in the OS.
Expand Down
1 change: 1 addition & 0 deletions test/Constraints/result_builder.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

enum Either<T,U> {
case first(T)
Expand Down
1 change: 1 addition & 0 deletions test/Constraints/result_builder_ast_transform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %target-run %t/main | %FileCheck %s

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values

@propertyWrapper
struct Wrapper<Value> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// RUN: %target-run %t/a.out

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: distributed
// REQUIRES: concurrency_runtime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

// REQUIRES: OS=macosx && (CPU=x86_64 || CPU=arm64)
// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: distributed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// REQUIRES: OS=macosx || OS=ios || OS=watchos || OS=tvos

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: distributed
// REQUIRES: concurrency_runtime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// RUN: %target-run %t/a.out

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: distributed
// REQUIRES: concurrency_runtime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// RUN: %target-run %t/a.out | %FileCheck %s

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: distributed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// RUN: %target-run %t/a.out | %FileCheck %s

// REQUIRES: executable_test
// XFAIL: swift_test_mode_optimize_none_with_opaque_values
// REQUIRES: concurrency
// REQUIRES: distributed

Expand Down
Loading