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

Snehasish Kumar via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 27 14:06:34 PST 2023


================
@@ -100,12 +103,6 @@ ValueProfNode *__llvm_profile_begin_vnodes();
 ValueProfNode *__llvm_profile_end_vnodes();
 uint32_t *__llvm_profile_begin_orderfile();
 
-/*!
- * \brief Clear profile counters to zero.
- *
- */
-void __llvm_profile_reset_counters(void);
----------------
snehasish wrote:

They are effectively removed if the frontend does not define __LLVM_INSTR_PROFILE_GENERATE (see my other comment). I would prefer the dependency to be in the other direction, include InstrProfiling.h in the interface `instr_prof_interface.h`.

> Are there downstream use cases that pull out compiler-rt/lib/profile/InstrProfiling.h and use it by itself?

Yes, we have one internal user that I can find.


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


More information about the cfe-commits mailing list