[flang-commits] [clang-tools-extra] [mlir] [clang] [lldb] [compiler-rt] [llvm] [flang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)
Zequan Wu via flang-commits
flang-commits at lists.llvm.org
Wed Nov 15 14:38:51 PST 2023
================
@@ -0,0 +1,46 @@
+// REQUIRES: linux || windows
+// Default
+// RUN: %clang -o %t.normal -fprofile-instr-generate -fcoverage-mapping -fuse-ld=lld %S/Inputs/instrprof-debug-info-correlate-main.cpp %S/Inputs/instrprof-debug-info-correlate-foo.cpp
+// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal
+// RUN: llvm-profdata merge -o %t.normal.profdata %t.profraw
+// RUN: llvm-cov report --instr-profile=%t.normal.profdata %t.normal > %t.normal.report
+// RUN: llvm-cov show --instr-profile=%t.normal.profdata %t.normal > %t.normal.show
+
+// With -profile-correlate=binary flag
+// RUN: %clang -o %t-1.exe -fprofile-instr-generate -fcoverage-mapping -mllvm -profile-correlate=binary -fuse-ld=lld %S/Inputs/instrprof-debug-info-correlate-main.cpp %S/Inputs/instrprof-debug-info-correlate-foo.cpp
----------------
ZequanWu wrote:
On Windows, it expands to `.tmp.exe`.
https://github.com/llvm/llvm-project/pull/69493
More information about the flang-commits
mailing list