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

Qiongsi Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 27 14:22:23 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);
----------------
qiongsiwu wrote:

> I would prefer the dependency to be in the other direction, include InstrProfiling.h in the interface instr_prof_interface.h.

Hmmm this is also something I am trying to avoid. The reason is that we are trying to not expose PGO internal definitions to the user. The intention is that a user can safely include `instr_prof_interface.h` in their program to use these public PGO APIs, without introducing all the PGO internal symbols to their programs.

Could you help me understand the advantage for `instr_prof_interface.h` to include `InstrProfiling.h`? 

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


More information about the cfe-commits mailing list