Skip to content

Commit 3325296

Browse files
committed
[test] Enable some profiler tests on non-macOS
1 parent 8b7a75c commit 3325296

19 files changed

+29
-84
lines changed

test/Profiler/coverage_errors_exec.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -profile-coverage-mapping -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// RUN: %llvm-cov show %t/main -instr-profile=%t/default.profdata | %FileCheck %s
119

1210
// REQUIRES: profile_runtime
1311
// REQUIRES: executable_test
14-
// REQUIRES: OS=macosx
1512

1613
struct Err: Error {}
1714

test/Profiler/coverage_optimized_report.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22

33
// RUN: %target-build-swift %s -profile-generate -profile-coverage-mapping -O -o %t/main
44

5-
// This unusual use of 'sh' allows the path of the profraw file to be
6-
// substituted by %target-run.
75
// RUN: %target-codesign %t/main
8-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
6+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
97

108
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
119
// RUN: %llvm-cov export -summary-only %t/main -instr-profile=%t/default.profdata | %FileCheck %s
1210

1311
// REQUIRES: profile_runtime
1412
// REQUIRES: executable_test
15-
// REQUIRES: OS=macosx
1613

1714
// CHECK: "lines":{"count":9,"covered":5{{.*}}"functions":{"count":5,"covered":3
1815

test/Profiler/coverage_pound_if_exec.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22

33
// RUN: %target-build-swift %s -profile-generate -profile-coverage-mapping -o %t/main
44

5-
// This unusual use of 'sh' allows the path of the profraw file to be
6-
// substituted by %target-run.
75
// RUN: %target-codesign %t/main
8-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
6+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
97

108
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
119
// RUN: %llvm-cov export -summary-only %t/main -instr-profile=%t/default.profdata | %FileCheck --check-prefix SUMMARY %s
1210
// RUN: %llvm-cov show %t/main -instr-profile=%t/default.profdata | %FileCheck --implicit-check-not "{{[ ]*\|[ ]*[0-9]+}}" %s
1311

1412
// REQUIRES: profile_runtime
1513
// REQUIRES: executable_test
16-
// REQUIRES: OS=macosx
1714

1815
// The line count here excludes the inactive regions.
1916
// SUMMARY: "lines":{"count":41,"covered":0

test/Profiler/coverage_relative_path_exec.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// REQUIRES: profile_runtime
22
// REQUIRES: executable_test
3-
// REQUIRES: OS=macosx
43

54
// This test is to make sure llvm-cov can deal with a coverage-prefix-map.
65

@@ -14,10 +13,8 @@
1413

1514
// RUN: %target-build-swift -profile-generate -profile-coverage-mapping -Xfrontend -coverage-prefix-map -Xfrontend %t/root=. -Xfrontend -disable-incremental-llvm-codegen -o %t/main %t/root/nested/coverage_relative_path.swift
1615

17-
// This unusual use of 'sh' allows the path of the profraw file to be
18-
// substituted by %target-run.
1916
// RUN: %target-codesign %t/main
20-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
17+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
2118

2219
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
2320
// RUN: %llvm-cov show %t/main -instr-profile=%t/default.profdata | %FileCheck --check-prefix SHOW %s

test/Profiler/coverage_smoke.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -profile-coverage-mapping -Xfrontend -disable-incremental-llvm-codegen -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// RUN: %llvm-profdata show %t/default.profdata -function=f_internal | %FileCheck %s --check-prefix=CHECK-INTERNAL
@@ -16,7 +14,6 @@
1614

1715
// REQUIRES: profile_runtime
1816
// REQUIRES: executable_test
19-
// REQUIRES: OS=macosx
2017

2118
// CHECK-INTERNAL: Functions shown: 1
2219
// CHECK-COV: {{ *}}[[@LINE+1]]|{{ *}}1{{.*}}func f_internal
-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %target-swift-frontend %s -profile-generate -profile-coverage-mapping -sanitize=address -emit-ir -o - | %FileCheck %s
22
// RUN: %target-swift-frontend -profile-generate -profile-coverage-mapping -emit-ir %s
33

4-
// REQUIRES: OS=macosx
5-
64
// CHECK: main
75
func main() {}

test/Profiler/issue-42929.swift

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -profile-coverage-mapping -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// RUN: %llvm-cov export -summary-only %t/main -instr-profile=%t/default.profdata | %FileCheck %s

test/Profiler/pgo_checked_cast.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
// RUN: %empty-directory(%t)
33
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_checked_cast -o %t/main
44

5-
// This unusual use of 'sh' allows the path of the profraw file to be
6-
// substituted by %target-run.
75
// RUN: %target-codesign %t/main
8-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
6+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
97

108
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
119
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_checked_cast -o - | %FileCheck %s --check-prefix=SIL
@@ -17,7 +15,6 @@
1715

1816
// REQUIRES: profile_runtime
1917
// REQUIRES: executable_test
20-
// REQUIRES: OS=macosx
2118

2219
// SIL-LABEL: // pgo_checked_cast.check1<A>(Any, A) -> A
2320
// SIL-LABEL: sil @$s16pgo_checked_cast6check1yxyp_xtlF : $@convention(thin) <T> (@in_guaranteed Any, @in_guaranteed T) -> @out T !function_entry_count(5001) {

test/Profiler/pgo_foreach.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_foreach -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// need to move counts attached to expr for this
@@ -18,7 +16,6 @@
1816

1917
// REQUIRES: profile_runtime
2018
// REQUIRES: executable_test
21-
// REQUIRES: OS=macosx
2219

2320
// UNSUPPORTED: swift_test_mode_optimize_none_with_implicit_dynamic
2421

test/Profiler/pgo_guard.swift

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_guard -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_guard -o - | %FileCheck %s --check-prefix=SIL
@@ -14,12 +12,11 @@
1412

1513
// REQUIRES: profile_runtime
1614
// REQUIRES: executable_test
17-
// REQUIRES: OS=macosx
1815

1916
// SIL-LABEL: // pgo_guard.guess1
2017
// SIL-LABEL: sil @$s9pgo_guard6guess11xs5Int32VAE_tF : $@convention(thin) (Int32) -> Int32 !function_entry_count(5002) {
21-
// IR-LABEL: define swiftcc i32 @"$s9pgo_guard6guess11xs5Int32VAE_tF"
22-
// IR-OPT-LABEL: define swiftcc{{.*}} i32 @"$s9pgo_guard6guess11xs5Int32VAE_tF"
18+
// IR-LABEL: define {{.*}} i32 @"$s9pgo_guard6guess11xs5Int32VAE_tF"
19+
// IR-OPT-LABEL: define {{.*}} i32 @"$s9pgo_guard6guess11xs5Int32VAE_tF"
2320

2421
public func guess1(x: Int32) -> Int32 {
2522
// SIL: cond_br {{.*}} !true_count(5000) !false_count(2)

test/Profiler/pgo_if.swift

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_if -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_if -o - | %FileCheck %s --check-prefix=SIL
@@ -13,13 +11,12 @@
1311
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -O -emit-ir -module-name pgo_if -o - | %FileCheck %s --check-prefix=IR-OPT
1412

1513
// REQUIRES: profile_runtime
16-
// REQUIRES: OS=macosx
1714
// REQUIRES: executable_test
1815

1916
// SIL-LABEL: // pgo_if.guess1
2017
// SIL-LABEL: sil @$s6pgo_if6guess11xs5Int32VAE_tF : $@convention(thin) (Int32) -> Int32 !function_entry_count(5001) {
21-
// IR-LABEL: define swiftcc i32 @"$s6pgo_if6guess11xs5Int32VAE_tF"
22-
// IR-OPT-LABEL: define swiftcc{{.*}} i32 @"$s6pgo_if6guess11xs5Int32VAE_tF"
18+
// IR-LABEL: define {{.*}} i32 @"$s6pgo_if6guess11xs5Int32VAE_tF"
19+
// IR-OPT-LABEL: define {{.*}} i32 @"$s6pgo_if6guess11xs5Int32VAE_tF"
2320
public func guess1(x: Int32) -> Int32 {
2421
// SIL: cond_br {{.*}} !true_count(5000) !false_count(1)
2522
// SIL-OPT: cond_br {{.*}} !true_count(5000) !false_count(1)
@@ -34,8 +31,8 @@ public func guess1(x: Int32) -> Int32 {
3431

3532
// SIL-LABEL: // pgo_if.guess2
3633
// SIL-LABEL: sil @$s6pgo_if6guess21xs5Int32VAE_tF : $@convention(thin) (Int32) -> Int32 !function_entry_count(5001) {
37-
// IR-LABEL: define swiftcc i32 @"$s6pgo_if6guess21xs5Int32VAE_tF"
38-
// IR-OPT-LABEL: define swiftcc{{.*}} i32 @"$s6pgo_if6guess21xs5Int32VAE_tF"
34+
// IR-LABEL: define {{.*}} i32 @"$s6pgo_if6guess21xs5Int32VAE_tF"
35+
// IR-OPT-LABEL: define {{.*}} i32 @"$s6pgo_if6guess21xs5Int32VAE_tF"
3936
public func guess2(x: Int32) -> Int32 {
4037
// SIL: cond_br {{.*}} !true_count(5000) !false_count(1)
4138
// SIL-OPT: cond_br {{.*}} !true_count(5000) !false_count(1)

test/Profiler/pgo_lazy.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_lazy -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108

@@ -15,7 +13,6 @@
1513

1614
// REQUIRES: profile_runtime
1715
// REQUIRES: executable_test
18-
// REQUIRES: OS=macosx
1916

2017
var cond = true
2118

test/Profiler/pgo_repeatwhile.swift

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_repeatwhile -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_repeatwhile -o - | %FileCheck %s --check-prefix=SIL
@@ -15,12 +13,11 @@
1513

1614
// REQUIRES: profile_runtime
1715
// REQUIRES: executable_test
18-
// REQUIRES: OS=macosx
1916

2017
// SIL-LABEL: // pgo_repeatwhile.guessWhile
2118
// SIL-LABEL: sil @$s15pgo_repeatwhile10guessWhile1xs5Int32VAE_tF : $@convention(thin) (Int32) -> Int32 !function_entry_count(42) {
22-
// IR-LABEL: define swiftcc i32 @"$s15pgo_repeatwhile10guessWhile1xs5Int32VAE_tF"
23-
// IR-OPT-LABEL: define swiftcc i32 @"$s15pgo_repeatwhile10guessWhile1xs5Int32VAE_tF"
19+
// IR-LABEL: define {{.*}} i32 @"$s15pgo_repeatwhile10guessWhile1xs5Int32VAE_tF"
20+
// IR-OPT-LABEL: define {{.*}} i32 @"$s15pgo_repeatwhile10guessWhile1xs5Int32VAE_tF"
2421

2522
public func guessWhile(x: Int32) -> Int32 {
2623
// SIL: cond_br {{.*}} !true_count(176400) !false_count(420)

test/Profiler/pgo_switchenum.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
// RUN: %empty-directory(%t)
33
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_switchenum -o %t/main
44

5-
// This unusual use of 'sh' allows the path of the profraw file to be
6-
// substituted by %target-run.
75
// RUN: %target-codesign %t/main
8-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
6+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
97

108
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
119
// need to move counts attached to expr for this
@@ -19,7 +17,6 @@
1917

2018
// REQUIRES: profile_runtime
2119
// REQUIRES: executable_test
22-
// REQUIRES: OS=macosx
2320

2421
public enum MaybePair {
2522
case Neither

test/Profiler/pgo_while.swift

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_while -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_while -o - | %FileCheck %s --check-prefix=SIL
@@ -15,12 +13,11 @@
1513

1614
// REQUIRES: profile_runtime
1715
// REQUIRES: executable_test
18-
// REQUIRES: OS=macosx
1916

2017
// SIL-LABEL: // pgo_while.guessWhile
2118
// SIL-LABEL: sil @$s9pgo_while10guessWhile1xs5Int32VAE_tF : $@convention(thin) (Int32) -> Int32 !function_entry_count(42) {
22-
// IR-LABEL: define swiftcc i32 @"$s9pgo_while10guessWhile1xs5Int32VAE_tF"
23-
// IR-OPT-LABEL: define swiftcc i32 @"$s9pgo_while10guessWhile1xs5Int32VAE_tF"
19+
// IR-LABEL: define {{.*}} i32 @"$s9pgo_while10guessWhile1xs5Int32VAE_tF"
20+
// IR-OPT-LABEL: define {{.*}} i32 @"$s9pgo_while10guessWhile1xs5Int32VAE_tF"
2421

2522
public func guessWhile(x: Int32) -> Int32 {
2623
// SIL: cond_br {{.*}} !true_count(420) !false_count(42)

test/Profiler/pgo_with_coverage.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_with_coverage -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108

@@ -13,7 +11,6 @@
1311

1412
// REQUIRES: profile_runtime
1513
// REQUIRES: executable_test
16-
// REQUIRES: OS=macosx
1714

1815
// Make sure we don't try and profile implicit decls during PGO.
1916
// IR-NOT: no profile data available

test/Profiler/rdar77217762_coverage.sil

+2-5
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
// RUN: %target-build-swift %s -profile-generate -profile-coverage-mapping -O -Xfrontend -disable-sil-perf-optzns -Xfrontend -disable-new-llvm-pass-manager -o %t/main1
1111
// RUN: %target-build-swift %s -profile-generate -profile-coverage-mapping -O -Xfrontend -disable-sil-perf-optzns -Xfrontend -enable-new-llvm-pass-manager -o %t/main2
1212

13-
// This unusual use of 'sh' allows the path of the profraw file to be
14-
// substituted by %target-run.
1513
// RUN: %target-codesign %t/main1
1614
// RUN: %target-codesign %t/main2
17-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default1.profraw %t/main1
18-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default2.profraw %t/main2
15+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default1.profraw %target-run %t/main1
16+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default2.profraw %target-run %t/main2
1917

2018
// RUN: %llvm-profdata merge %t/default1.profraw -o %t/default1.profdata
2119
// RUN: %llvm-profdata merge %t/default2.profraw -o %t/default2.profdata
@@ -25,7 +23,6 @@
2523

2624
// REQUIRES: profile_runtime
2725
// REQUIRES: executable_test
28-
// REQUIRES: OS=macosx
2926

3027
sil_stage canonical
3128

test/SILOptimizer/pgo_si_inlinelarge.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_si_inlinelarge -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// RUN: %target-swift-frontend %s -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_si_inlinelarge -o - | %FileCheck %s --check-prefix=SIL
119
// RUN: %target-swift-frontend %s -profile-use=%t/default.profdata -O -emit-sorted-sil -emit-sil -module-name pgo_si_inlinelarge -o - | %FileCheck %s --check-prefix=SIL-OPT
1210

1311
// REQUIRES: profile_runtime
1412
// REQUIRES: executable_test
15-
// REQUIRES: OS=macosx
1613

1714
public func bar(_ x: Int64) -> Int64 {
1815
if (x == 0) {

test/SILOptimizer/pgo_si_reduce.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_si_reduce -o %t/main
33

4-
// This unusual use of 'sh' allows the path of the profraw file to be
5-
// substituted by %target-run.
64
// RUN: %target-codesign %t/main
7-
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
5+
// RUN: env %env-LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
86

97
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
108
// RUN: %target-swift-frontend %s -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_si_reduce -o - | %FileCheck %s --check-prefix=SIL
119
// RUN: %target-swift-frontend %s -profile-use=%t/default.profdata -O -emit-sorted-sil -emit-sil -module-name pgo_si_reduce -o - | %FileCheck %s --check-prefix=SIL-OPT
1210

1311
// REQUIRES: profile_runtime
1412
// REQUIRES: executable_test
15-
// REQUIRES: OS=macosx
1613

1714
public func bar(_ x: Int32) -> Int32 {
1815
if (x == 0) {

0 commit comments

Comments
 (0)