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

Teresa Johnson via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 27 13:58:22 PST 2023


teresajohnson wrote:

> @teresajohnson I mentioned the same thing on [discourse](https://discourse.llvm.org/t/pgo-are-the-llvm-profile-functions-stable-c-apis-across-llvm-releases/75832/5) but it seems like linking on AIX does not support this model.

I see. Perhaps instead of defining these away completely, they should be defined to a dummy function with the same signature that always returns success (0 I think)? Alternatively, not define them at all when __LLVM_INSTR_PROFILE_GENERATE not defined and have the user guard calls by `#ifdef __LLVM_INSTR_PROFILE_GENERATE`. Otherwise, the user either cannot check the return values, or they have to guard their usage by a check of __LLVM_INSTR_PROFILE_GENERATE anyway.

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


More information about the cfe-commits mailing list