================
@@ -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:

> They are effectively removed if the frontend does not define 
> __LLVM_INSTR_PROFILE_GENERATE (see my other comment).

`__LLVM_INSTR_PROFILE_GENERATE` is defined explicitly in this header 
`compiler-rt/lib/profile/InstrProfiling.h` before the new header is included 
(see 
https://github.com/llvm/llvm-project/pull/76471/files#diff-4de780ce726d76b7abc9d3353aef95013e7b21e7bda01be8940cc6574fb0b5ffR15)
 so that we do not depend on the frontend for the macro in the compiler-rt 
context, and we make sure that these three names are always available 
(regardless of frontend options). 

I am trying to avoid wrappers or duplicating definitions. [This 
comment](https://discourse.llvm.org/t/pgo-are-the-llvm-profile-functions-stable-c-apis-across-llvm-releases/75832/7?u=qwu_ibm)
 seem to imply that creating wrapper or duplicating definition is not 
desirable. However, if avoiding wrapper or duplication is making downstream 
code unnecessarily complicated, I will create the wrappers instead. 

https://github.com/llvm/llvm-project/pull/76471
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to