[compiler-rt] 7fa9930 - Rename hasCorrelation to __llvm_profile_has_correlation
Zequan Wu via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 11:46:10 PDT 2023
Author: Zequan Wu
Date: 2023-11-02T14:45:59-04:00
New Revision: 7fa9930847bbef4319c2d2e9c782eb5c8e6b1892
URL: https://github.com/llvm/llvm-project/commit/7fa9930847bbef4319c2d2e9c782eb5c8e6b1892
DIFF: https://github.com/llvm/llvm-project/commit/7fa9930847bbef4319c2d2e9c782eb5c8e6b1892.diff
LOG: Rename hasCorrelation to __llvm_profile_has_correlation
Added:
Modified:
compiler-rt/lib/profile/InstrProfiling.c
compiler-rt/lib/profile/InstrProfiling.h
compiler-rt/lib/profile/InstrProfilingBuffer.c
compiler-rt/lib/profile/InstrProfilingMerge.c
compiler-rt/lib/profile/InstrProfilingWriter.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/profile/InstrProfiling.c b/compiler-rt/lib/profile/InstrProfiling.c
index 03b622b5e8e9468..51477c6080559d0 100644
--- a/compiler-rt/lib/profile/InstrProfiling.c
+++ b/compiler-rt/lib/profile/InstrProfiling.c
@@ -90,6 +90,6 @@ COMPILER_RT_VISIBILITY void __llvm_profile_reset_counters(void) {
lprofSetProfileDumped(0);
}
-COMPILER_RT_VISIBILITY int hasCorrelation() {
+COMPILER_RT_VISIBILITY int __llvm_profile_has_correlation() {
return (__llvm_profile_get_version() & VARIANT_MASK_DBG_CORRELATE) != 0ULL;
}
diff --git a/compiler-rt/lib/profile/InstrProfiling.h b/compiler-rt/lib/profile/InstrProfiling.h
index b8104af5f12b910..3c79786e56c48ce 100644
--- a/compiler-rt/lib/profile/InstrProfiling.h
+++ b/compiler-rt/lib/profile/InstrProfiling.h
@@ -262,7 +262,7 @@ uint64_t __llvm_profile_get_magic(void);
uint64_t __llvm_profile_get_version(void);
/*! \brief If the binary is compiled with profile correlation. */
-int hasCorrelation();
+int __llvm_profile_has_correlation();
/*! \brief Get the number of entries in the profile data section. */
uint64_t __llvm_profile_get_num_data(const __llvm_profile_data *Begin,
diff --git a/compiler-rt/lib/profile/InstrProfilingBuffer.c b/compiler-rt/lib/profile/InstrProfilingBuffer.c
index 69965142d978746..87546f6c9e4f284 100644
--- a/compiler-rt/lib/profile/InstrProfilingBuffer.c
+++ b/compiler-rt/lib/profile/InstrProfilingBuffer.c
@@ -56,7 +56,7 @@ uint64_t __llvm_profile_get_size_for_buffer(void) {
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_num_data(const __llvm_profile_data *Begin,
const __llvm_profile_data *End) {
- if (hasCorrelation())
+ if (__llvm_profile_has_correlation())
return 0;
intptr_t BeginI = (intptr_t)Begin, EndI = (intptr_t)End;
return ((EndI + sizeof(__llvm_profile_data) - 1) - BeginI) /
@@ -66,7 +66,7 @@ uint64_t __llvm_profile_get_num_data(const __llvm_profile_data *Begin,
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin,
const __llvm_profile_data *End) {
- if (hasCorrelation())
+ if (__llvm_profile_has_correlation())
return 0;
return __llvm_profile_get_num_data(Begin, End) * sizeof(__llvm_profile_data);
}
@@ -98,7 +98,7 @@ uint64_t __llvm_profile_get_num_bitmap_bytes(const char *Begin,
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_name_size(const char *Begin, const char *End) {
- if (hasCorrelation())
+ if (__llvm_profile_has_correlation())
return 0;
return End - Begin;
}
diff --git a/compiler-rt/lib/profile/InstrProfilingMerge.c b/compiler-rt/lib/profile/InstrProfilingMerge.c
index b08973debda94f3..da43653865663fe 100644
--- a/compiler-rt/lib/profile/InstrProfilingMerge.c
+++ b/compiler-rt/lib/profile/InstrProfilingMerge.c
@@ -141,7 +141,7 @@ int __llvm_profile_merge_from_buffer(const char *ProfileData,
// Merge counters by iterating the entire counter section when correlation is
// enabled.
- if (hasCorrelation()) {
+ if (__llvm_profile_has_correlation()) {
for (SrcCounter = SrcCountersStart,
DstCounter = __llvm_profile_begin_counters();
SrcCounter < SrcCountersEnd;) {
diff --git a/compiler-rt/lib/profile/InstrProfilingWriter.c b/compiler-rt/lib/profile/InstrProfilingWriter.c
index d35ee6b20504f3e..ac096bd1e5480fd 100644
--- a/compiler-rt/lib/profile/InstrProfilingWriter.c
+++ b/compiler-rt/lib/profile/InstrProfilingWriter.c
@@ -262,7 +262,7 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin,
const char *BitmapBegin, const char *BitmapEnd,
VPDataReaderType *VPDataReader, const char *NamesBegin,
const char *NamesEnd, int SkipNameDataWrite) {
- int ProfileCorrelation = hasCorrelation();
+ int ProfileCorrelation = __llvm_profile_has_correlation();
/* Calculate size of sections. */
const uint64_t DataSectionSize =
More information about the llvm-commits
mailing list