From fda6a1ad4202b35c604a508aab4c543e1b7693af Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 13 Feb 2022 10:33:56 -0800 Subject: [PATCH] [Transforms] Use default member initialization in CHRStats (NFC) --- .../Instrumentation/ControlHeightReduction.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp index 497aac3..29d0e3e 100644 --- a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp +++ b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp @@ -145,19 +145,19 @@ FunctionPass *llvm::createControlHeightReductionLegacyPass() { namespace { struct CHRStats { - CHRStats() : NumBranches(0), NumBranchesDelta(0), - WeightedNumBranchesDelta(0) {} + CHRStats() = default; void print(raw_ostream &OS) const { OS << "CHRStats: NumBranches " << NumBranches << " NumBranchesDelta " << NumBranchesDelta << " WeightedNumBranchesDelta " << WeightedNumBranchesDelta; } - uint64_t NumBranches; // The original number of conditional branches / - // selects - uint64_t NumBranchesDelta; // The decrease of the number of conditional - // branches / selects in the hot paths due to CHR. - uint64_t WeightedNumBranchesDelta; // NumBranchesDelta weighted by the profile - // count at the scope entry. + // The original number of conditional branches / selects + uint64_t NumBranches = 0; + // The decrease of the number of conditional branches / selects in the hot + // paths due to CHR. + uint64_t NumBranchesDelta = 0; + // NumBranchesDelta weighted by the profile count at the scope entry. + uint64_t WeightedNumBranchesDelta = 0; }; // RegInfo - some properties of a Region. -- 2.7.4