[llvm] d679cdd - [Bitcode] Modernize PerBlockIDStats (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat May 27 10:29:36 PDT 2023
Author: Kazu Hirata
Date: 2023-05-27T10:29:21-07:00
New Revision: d679cdda50910f5ba3e9ecaacb77bcaacb15d6c8
URL: https://github.com/llvm/llvm-project/commit/d679cdda50910f5ba3e9ecaacb77bcaacb15d6c8
DIFF: https://github.com/llvm/llvm-project/commit/d679cdda50910f5ba3e9ecaacb77bcaacb15d6c8.diff
LOG: [Bitcode] Modernize PerBlockIDStats (NFC)
Added:
Modified:
llvm/include/llvm/Bitcode/BitcodeAnalyzer.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Bitcode/BitcodeAnalyzer.h b/llvm/include/llvm/Bitcode/BitcodeAnalyzer.h
index 63ecf85133601..33a294994618d 100644
--- a/llvm/include/llvm/Bitcode/BitcodeAnalyzer.h
+++ b/llvm/include/llvm/Bitcode/BitcodeAnalyzer.h
@@ -65,21 +65,19 @@ class BitcodeAnalyzer {
struct PerBlockIDStats {
/// NumInstances - This the number of times this block ID has been seen.
- unsigned NumInstances;
+ unsigned NumInstances = 0;
/// NumBits - The total size in bits of all of these blocks.
- uint64_t NumBits;
+ uint64_t NumBits = 0;
/// NumSubBlocks - The total number of blocks these blocks contain.
- unsigned NumSubBlocks;
+ unsigned NumSubBlocks = 0;
/// NumAbbrevs - The total number of abbreviations.
- unsigned NumAbbrevs;
+ unsigned NumAbbrevs = 0;
/// NumRecords - The total number of records these blocks contain, and the
/// number that are abbreviated.
- unsigned NumRecords, NumAbbreviatedRecords;
+ unsigned NumRecords = 0, NumAbbreviatedRecords = 0;
/// CodeFreq - Keep track of the number of times we see each code.
std::vector<PerRecordStats> CodeFreq;
- PerBlockIDStats()
- : NumInstances(0), NumBits(0), NumSubBlocks(0), NumAbbrevs(0),
- NumRecords(0), NumAbbreviatedRecords(0) {}
+ PerBlockIDStats() = default;
};
std::map<unsigned, PerBlockIDStats> BlockIDStats;
More information about the llvm-commits
mailing list