@@ -261,6 +261,9 @@ uint64_t __llvm_profile_get_magic(void);
/*! \brief Get the version of the file format. */
uint64_t __llvm_profile_get_version(void);
+/*! \brief If the binary is compiled with profile correlation. */
+int hasCorrelation();
ZequanWu wrote:
ZequanWu wrote:
> > Sounds fine to me, but I guess I don't understand why `-profile-correlate=`
> > doesn't work. Do you still plan to add the flag later?
>
> I haven't found a way to share information (whether of not binary correlation
> is enabled) between
@@ -89,3 +89,7 @@ COMPILER_RT_VISIBILITY void
__llvm_profile_reset_counters(void) {
}
lprofSetProfileDumped(0);
}
+
+inline int hasCorrelation() {
petrhosek wrote:
The function should have a hidden visibility (the `COMPILER_RT_VISIBILITY`
macro) so it's
@@ -261,6 +261,9 @@ uint64_t __llvm_profile_get_magic(void);
/*! \brief Get the version of the file format. */
uint64_t __llvm_profile_get_version(void);
+/*! \brief If the binary is compiled with profile correlation. */
+int hasCorrelation();
petrhosek
ZequanWu wrote:
Sorry for so many noise regarding this change.
https://github.com/llvm/llvm-project/pull/70856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ZequanWu created
https://github.com/llvm/llvm-project/pull/70856
Refactor some code from https://github.com/llvm/llvm-project/pull/69493.
#70712 was reverted due to linking failures. So, I removed
`-profile-correlate=` flag and kept `-debug-info-correlate` in this change.