Skip to content

Commit 4cc492d

Browse files
author
Wael Yehia
committed
[PGO] Use fprofile-continuous in compiler-rt tests
1 parent 7ae78a6 commit 4cc492d

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

compiler-rt/test/profile/ContinuousSyncMode/basic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// REQUIRES: continuous-mode
22

3-
// RUN: %clang_profgen_cont -fcoverage-mapping -o %t.exe %s
3+
// RUN: %clang_profgen=%t.profraw -fprofile-continuous -fcoverage-mapping -o %t.exe %s
44
// RUN: echo "garbage" > %t.profraw
5-
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe
5+
// RUN: %run %t.exe
66
// RUN: llvm-profdata show --counts --all-functions %t.profraw | FileCheck %s -check-prefix=CHECK-COUNTS
77
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
88
//

compiler-rt/test/profile/ContinuousSyncMode/get-filename.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: continuous-mode
22

3-
// RUN: %clang_pgogen_cont -o %t.exe %s
3+
// RUN: %clang_pgogen -fprofile-continuous -o %t.exe %s
44
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe %t.profraw
55
// RUN: env LLVM_PROFILE_FILE="%t%c.profraw" %run %t.exe %t.profraw
66
// RUN: env LLVM_PROFILE_FILE="%t.profraw%c" %run %t.exe %t.profraw

compiler-rt/test/profile/ContinuousSyncMode/image-with-mcdc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: continuous-mode
22

3-
// RUN: %clang_profgen_cont -fcoverage-mapping -fcoverage-mcdc -O3 -o %t.exe %s
4-
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe 3 3
3+
// RUN: %clang_profgen=%t.profraw -fprofile-continuous -fcoverage-mapping -fcoverage-mcdc -O3 -o %t.exe %s
4+
// RUN: %run %t.exe 3 3
55
// RUN: llvm-profdata show --text --all-functions %t.profraw | FileCheck %s
66

77
// CHECK: Num Bitmap Bytes:

compiler-rt/test/profile/ContinuousSyncMode/image-with-no-counters.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// REQUIRES: target={{.*(darwin|aix).*}}
22

33
// RUN: echo "static void dead_code(void) {}" > %t.dso.c
4-
// RUN: %clang_profgen_cont -fcoverage-mapping -O3 %shared_lib_flag -o %t.dso.dylib %t.dso.c
5-
// RUN: %clang_profgen_cont -fcoverage-mapping -O3 -o %t.exe %s %t.dso.dylib
6-
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe 2>&1 | count 0
4+
// RUN: %clang_profgen=%t.profraw -fprofile-continuous -fcoverage-mapping -O3 %shared_lib_flag -o %t.dso.dylib %t.dso.c
5+
// RUN: %clang_profgen=%t.profraw -fprofile-continuous -fcoverage-mapping -O3 -o %t.exe %s %t.dso.dylib
6+
// RUN: %run %t.exe 2>&1 | count 0
77
// RUN: llvm-profdata show --counts --all-functions %t.profraw | FileCheck %s
88

99
// CHECK: Total functions: 1

compiler-rt/test/profile/ContinuousSyncMode/multi-threaded.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// REQUIRES: continuous-mode
22

3-
// RUN: rm -f %t.profraw
4-
// RUN: %clangxx_pgogen_cont -lpthread %s -o %t.exe -mllvm -disable-vp -fprofile-update=atomic
5-
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe
6-
// RUN: llvm-profdata show --counts --function=accum %t.profraw | FileCheck %s
3+
// RUN: rm -rf %t.dir
4+
// RUN: %clangxx_pgogen=%t.dir -fprofile-continuous -lpthread %s -o %t.exe -mllvm -disable-vp -fprofile-update=atomic
5+
// RUN: %run %t.exe
6+
// RUN: llvm-profdata show --counts --function=accum %t.dir/default_*.profraw | FileCheck %s
77
// CHECK: Block counts: [100000, 4]
88

99
#include <thread>

compiler-rt/test/profile/ContinuousSyncMode/online-merging.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
// Create two DSOs and a driver program that uses them.
1010
// RUN: echo "void dso1(void) {}" > dso1.c
1111
// RUN: echo "void dso2(void) {}" > dso2.c
12-
// RUN: %clang_pgogen_cont %shared_lib_flag -o %t.dir/dso1.dylib dso1.c -fprofile-update=atomic
13-
// RUN: %clang_pgogen_cont %shared_lib_flag -o %t.dir/dso2.dylib dso2.c -fprofile-update=atomic
14-
// RUN: %clang_pgogen_cont -o main.exe %s %t.dir/dso1.dylib %t.dir/dso2.dylib -fprofile-update=atomic
12+
// RUN: %clang_pgogen -fprofile-continuous %shared_lib_flag -o %t.dir/dso1.dylib dso1.c -fprofile-update=atomic
13+
// RUN: %clang_pgogen -fprofile-continuous %shared_lib_flag -o %t.dir/dso2.dylib dso2.c -fprofile-update=atomic
14+
// RUN: %clang_pgogen -fprofile-continuous -o main.exe %s %t.dir/dso1.dylib %t.dir/dso2.dylib -fprofile-update=atomic
1515
//
1616
// === Round 1 ===
1717
// Test merging+continuous mode without any file contention.

compiler-rt/test/profile/ContinuousSyncMode/set-filename.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: continuous-mode
22

3-
// RUN: %clang_pgogen_cont -o %t.exe %s
3+
// RUN: %clang_pgogen -fprofile-continuous -o %t.exe %s
44
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe %t.profraw %t.bad
55

66
#include <string.h>

0 commit comments

Comments
 (0)