[llvm] fda6a1a - [Transforms] Use default member initialization in CHRStats (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 13 10:34:22 PST 2022
Author: Kazu Hirata
Date: 2022-02-13T10:33:56-08:00
New Revision: fda6a1ad4202b35c604a508aab4c543e1b7693af
URL: https://github.com/llvm/llvm-project/commit/fda6a1ad4202b35c604a508aab4c543e1b7693af
DIFF: https://github.com/llvm/llvm-project/commit/fda6a1ad4202b35c604a508aab4c543e1b7693af.diff
LOG: [Transforms] Use default member initialization in CHRStats (NFC)
Added:
Modified:
llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
index 497aac30c3f65..29d0e3e8bd6e9 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.
More information about the llvm-commits
mailing list