Skip to content

Commit e690e2a

Browse files
committed
Update llvm-profdata test fix
That is, replace our local hack with the fix from 1d0a961 from PR#93365.
1 parent d460ffa commit e690e2a

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

offload/test/lit.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ config.available_features.add(config.libomptarget_current_target)
112112
if config.libomptarget_has_libc:
113113
config.available_features.add('libc')
114114

115+
profdata_path = os.path.join(config.bin_llvm_tools_dir, "llvm-profdata")
115116
if config.libomptarget_test_pgo:
116117
config.available_features.add('pgo')
118+
config.substitutions.append(("%profdata", profdata_path))
117119

118120
# Determine whether the test system supports unified memory.
119121
# For CUDA, this is the case with compute capability 70 (Volta) or higher.
@@ -420,5 +422,3 @@ config.substitutions.append(("%flags", config.test_flags))
420422
config.substitutions.append(("%not", config.libomptarget_not))
421423
config.substitutions.append(("%offload-device-info",
422424
config.offload_device_info))
423-
config.substitutions.append(("llvm-profdata",
424-
config.bin_dir + "/../../bin/llvm-profdata"))

offload/test/lit.site.cfg.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@AUTO_GEN_COMMENT@
22

3-
config.bin_dir = "@CMAKE_BINARY_DIR@"
4-
config.bin_llvm_tools_dir = "@CMAKE_BINARY_DIR@/bin"
3+
config.bin_llvm_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@"
54
config.test_c_compiler = "@OPENMP_TEST_C_COMPILER@"
65
config.test_cxx_compiler = "@OPENMP_TEST_CXX_COMPILER@"
76
config.test_fortran_compiler="@OPENMP_TEST_Fortran_COMPILER@"

offload/test/offloading/gpupgo/pgo1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// RUN: %libomptarget-compile-generic -fprofile-generate-gpu
22
// RUN: env LLVM_PROFILE_FILE=%basename_t.llvm.profraw \
33
// RUN: %libomptarget-run-generic 2>&1
4-
// RUN: llvm-profdata show --all-functions --counts \
4+
// RUN: %profdata show --all-functions --counts \
55
// RUN: %target_triple.%basename_t.llvm.profraw | \
66
// RUN: %fcheck-generic --check-prefix="LLVM-PGO"
77

88
// RUN: %libomptarget-compile-generic -fprofile-instr-generate-gpu
99
// RUN: env LLVM_PROFILE_FILE=%basename_t.clang.profraw \
1010
// RUN: %libomptarget-run-generic 2>&1
11-
// RUN: llvm-profdata show --all-functions --counts \
11+
// RUN: %profdata show --all-functions --counts \
1212
// RUN: %target_triple.%basename_t.clang.profraw | \
1313
// RUN: %fcheck-generic --check-prefix="CLANG-PGO"
1414

offload/test/offloading/gpupgo/pgo2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
// RUN: -fprofile-generate-gpu
33
// RUN: env LLVM_PROFILE_FILE=%basename_t.llvm.profraw \
44
// RUN: %libomptarget-run-generic 2>&1
5-
// RUN: llvm-profdata show --all-functions --counts \
5+
// RUN: %profdata show --all-functions --counts \
66
// RUN: %basename_t.llvm.profraw | %fcheck-generic \
77
// RUN: --check-prefix="LLVM-HOST"
8-
// RUN: llvm-profdata show --all-functions --counts \
8+
// RUN: %profdata show --all-functions --counts \
99
// RUN: %target_triple.%basename_t.llvm.profraw \
1010
// RUN: | %fcheck-generic --check-prefix="LLVM-DEVICE"
1111

1212
// RUN: %libomptarget-compile-generic -fprofile-instr-generate \
1313
// RUN: -fprofile-instr-generate-gpu
1414
// RUN: env LLVM_PROFILE_FILE=%basename_t.clang.profraw \
1515
// RUN: %libomptarget-run-generic 2>&1
16-
// RUN: llvm-profdata show --all-functions --counts \
16+
// RUN: %profdata show --all-functions --counts \
1717
// RUN: %basename_t.clang.profraw | %fcheck-generic \
1818
// RUN: --check-prefix="CLANG-HOST"
19-
// RUN: llvm-profdata show --all-functions --counts \
19+
// RUN: %profdata show --all-functions --counts \
2020
// RUN: %target_triple.%basename_t.clang.profraw | \
2121
// RUN: %fcheck-generic --check-prefix="CLANG-DEV"
2222

0 commit comments

Comments
 (0)