Skip to content

Commit d5d3f98

Browse files
[LTO] Modernize AliasSummary and ModuleSummaryIndex (NFC) (llvm#107633)
1 parent 49660e5 commit d5d3f98

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/include/llvm/IR/ModuleSummaryIndex.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -640,12 +640,11 @@ class AliasSummary : public GlobalValueSummary {
640640
/// memory for time). Note that this pointer may be null (and the value info
641641
/// empty) when we have a distributed index where the alias is being imported
642642
/// (as a copy of the aliasee), but the aliasee is not.
643-
GlobalValueSummary *AliaseeSummary;
643+
GlobalValueSummary *AliaseeSummary = nullptr;
644644

645645
public:
646646
AliasSummary(GVFlags Flags)
647-
: GlobalValueSummary(AliasKind, Flags, SmallVector<ValueInfo, 0>{}),
648-
AliaseeSummary(nullptr) {}
647+
: GlobalValueSummary(AliasKind, Flags, SmallVector<ValueInfo, 0>{}) {}
649648

650649
/// Check if this is an alias summary.
651650
static bool classof(const GlobalValueSummary *GVS) {
@@ -1420,7 +1419,7 @@ class ModuleSummaryIndex {
14201419
// used except in the case of a SamplePGO partial profile, and should be
14211420
// reevaluated/redesigned to allow more effective incremental builds in that
14221421
// case.
1423-
uint64_t BlockCount;
1422+
uint64_t BlockCount = 0;
14241423

14251424
// List of unique stack ids (hashes). We use a 4B index of the id in the
14261425
// stack id lists on the alloc and callsite summaries for memory savings,
@@ -1446,7 +1445,7 @@ class ModuleSummaryIndex {
14461445
ModuleSummaryIndex(bool HaveGVs, bool EnableSplitLTOUnit = false,
14471446
bool UnifiedLTO = false)
14481447
: HaveGVs(HaveGVs), EnableSplitLTOUnit(EnableSplitLTOUnit),
1449-
UnifiedLTO(UnifiedLTO), Saver(Alloc), BlockCount(0) {}
1448+
UnifiedLTO(UnifiedLTO), Saver(Alloc) {}
14501449

14511450
// Current version for the module summary in bitcode files.
14521451
// The BitcodeSummaryVersion should be bumped whenever we introduce changes

0 commit comments

Comments
 (0)