[llvm] a0153ea - [memprof] Fix builds under EXPENSIVE_CHECKS

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 17:23:22 PST 2024


Author: Kazu Hirata
Date: 2024-11-22T17:23:16-08:00
New Revision: a0153eaa65e718f16fd22b4b784e0f8153f695d4

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

LOG: [memprof] Fix builds under EXPENSIVE_CHECKS

memprof::Version1 has been removed, so the whole block of code is
dead.

Added: 
    

Modified: 
    llvm/lib/ProfileData/InstrProfReader.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp
index 2e4ce5a2782f7e..76638522365942 100644
--- a/llvm/lib/ProfileData/InstrProfReader.cpp
+++ b/llvm/lib/ProfileData/InstrProfReader.cpp
@@ -1345,18 +1345,6 @@ Error IndexedMemProfReader::deserialize(const unsigned char *Start,
     break;
   }
 
-#ifdef EXPENSIVE_CHECKS
-  // Go through all the records and verify that CSId has been correctly
-  // populated.  Do this only under EXPENSIVE_CHECKS.  Otherwise, we
-  // would defeat the purpose of OnDiskIterableChainedHashTable.
-  // Note that we can compare CSId against actual call stacks only for
-  // Version0 and Version1 because IndexedAllocationInfo::CallStack and
-  // IndexedMemProfRecord::CallSites are not populated in Version2.
-  if (Version <= memprof::Version1)
-    for (const auto &Record : MemProfRecordTable->data())
-      verifyIndexedMemProfRecord(Record);
-#endif
-
   return Error::success();
 }
 


        


More information about the llvm-commits mailing list