[clang-tools-extra] [clang] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

Mingming Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 2 11:53:07 PST 2024


================
@@ -0,0 +1,38 @@
+// RUN: %clang_profgen %s --target=ppc64le-unknown-linux-gnu -S \
+// RUN:    -emit-llvm -o - | FileCheck %s --check-prefix=PROFGEN
+// RUN: %clang_profgen -o %t %s
+// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
----------------
minglotus-6 wrote:

After reading your comment, I was about to say the binary is compiled with `ppc64le` and requires `host-byteorder-little-endian` but realized the `--target=ppc64le-unknown-linux-gnu` is only used with `-emit-llvm`, and the `RUN` lines that build executables doesn't specify a target.

Nevertheless, I wonder test coverage for `%clang_pgogen` should be added here as well.

Relatedly, I do get compilation errors on ppc big-endian systems for `clang_pgogen` in another compiler-rt test ([commit](https://github.com/llvm/llvm-project/commit/5136c167a2573fbd05179849cb41b198c4862b12) and [buildbot link](https://lab.llvm.org/buildbot/#/builders/18/builds/13228)

>From the error message, I *think* lack of ABI implementation should manifest whether it's `clang_pgogen` or `clang_profgen`.

https://github.com/llvm/llvm-project/pull/76471


More information about the cfe-commits mailing list