[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
@@ -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:

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
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

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Petr Hosek via cfe-commits
@@ -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

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Petr Hosek via cfe-commits
@@ -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

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-10-31 Thread Zequan Wu via cfe-commits
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

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-10-31 Thread Zequan Wu via 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.