[compiler-rt] bfc965c - [Profile] Removed incorrect check introduced by cf2cf195d5fb0a07c122c5c274bd6deb0790e015.
Zequan Wu via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 13:12:25 PDT 2023
Author: Zequan Wu
Date: 2023-08-14T16:11:52-04:00
New Revision: bfc965c54fdbfe33a0785b45903b53fc11165f13
URL: https://github.com/llvm/llvm-project/commit/bfc965c54fdbfe33a0785b45903b53fc11165f13
DIFF: https://github.com/llvm/llvm-project/commit/bfc965c54fdbfe33a0785b45903b53fc11165f13.diff
LOG: [Profile] Removed incorrect check introduced by cf2cf195d5fb0a07c122c5c274bd6deb0790e015.
There may be some padding before or after counters.
Added:
Modified:
compiler-rt/lib/profile/InstrProfilingMerge.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/profile/InstrProfilingMerge.c b/compiler-rt/lib/profile/InstrProfilingMerge.c
index c4ae067c4dc902..920db58cbba04d 100644
--- a/compiler-rt/lib/profile/InstrProfilingMerge.c
+++ b/compiler-rt/lib/profile/InstrProfilingMerge.c
@@ -49,14 +49,10 @@ int __llvm_profile_check_compatibility(const char *ProfileData,
uint64_t ProfileSize) {
__llvm_profile_header *Header = (__llvm_profile_header *)ProfileData;
__llvm_profile_data *SrcDataStart, *SrcDataEnd, *SrcData, *DstData;
- char *SrcCountersStart, *SrcCountersEnd;
SrcDataStart =
(__llvm_profile_data *)(ProfileData + sizeof(__llvm_profile_header) +
Header->BinaryIdsSize);
SrcDataEnd = SrcDataStart + Header->DataSize;
- SrcCountersStart = (char *)SrcDataEnd;
- SrcCountersEnd = SrcCountersStart +
- Header->CountersSize * __llvm_profile_counter_entry_size();
if (ProfileSize < sizeof(__llvm_profile_header))
return 1;
@@ -75,11 +71,6 @@ int __llvm_profile_check_compatibility(const char *ProfileData,
Header->ValueKindLast != IPVK_Last)
return 1;
- if (SrcCountersEnd - SrcCountersStart !=
- __llvm_profile_end_counters() - __llvm_profile_begin_counters()) {
- return 1;
- }
-
if (ProfileSize <
sizeof(__llvm_profile_header) + Header->BinaryIdsSize +
Header->DataSize * sizeof(__llvm_profile_data) + Header->NamesSize +
More information about the llvm-commits
mailing list