[compiler-rt] b73742b - [Profile] Remove redundant check

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 10 16:25:11 PDT 2021


Author: Arthur Eubanks
Date: 2021-06-10T16:24:53-07:00
New Revision: b73742bc8d2ec53f0892f1609837c088f9cfcf64

URL: https://github.com/llvm/llvm-project/commit/b73742bc8d2ec53f0892f1609837c088f9cfcf64
DIFF: https://github.com/llvm/llvm-project/commit/b73742bc8d2ec53f0892f1609837c088f9cfcf64.diff

LOG: [Profile] Remove redundant check

This is already checked outside the loop.

Followup to D104050.

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 4dce2d119dbe..913228513259 100644
--- a/compiler-rt/lib/profile/InstrProfilingMerge.c
+++ b/compiler-rt/lib/profile/InstrProfilingMerge.c
@@ -109,7 +109,7 @@ int __llvm_profile_merge_from_buffer(const char *ProfileData,
     unsigned NVK = 0;
 
     unsigned NC = SrcData->NumCounters;
-    if (NC == 0 || (const char *)SrcCountersStart >= SrcNameStart)
+    if (NC == 0)
       return 1;
     uint64_t *SrcCounters = SrcCountersStart + ((size_t)SrcData->CounterPtr -
                                                 Header->CountersDelta) /


        


More information about the llvm-commits mailing list