[llvm] 9ed6800 - [Transforms] Use default member initialization in MaskOps (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 5 21:39:55 PST 2022


Author: Kazu Hirata
Date: 2022-02-05T21:39:21-08:00
New Revision: 9ed6800ef98f61a7775286a402fe83a8dbe0d794

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

LOG: [Transforms] Use default member initialization in MaskOps (NFC)

Added: 
    

Modified: 
    llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
index 7243e39c90293..8551c9092d201 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
@@ -200,14 +200,13 @@ static bool foldGuardedFunnelShift(Instruction &I, const DominatorTree &DT) {
 /// of 'and' ops, then we also need to capture the fact that we saw an
 /// "and X, 1", so that's an extra return value for that case.
 struct MaskOps {
-  Value *Root;
+  Value *Root = nullptr;
   APInt Mask;
   bool MatchAndChain;
-  bool FoundAnd1;
+  bool FoundAnd1 = false;
 
   MaskOps(unsigned BitWidth, bool MatchAnds)
-      : Root(nullptr), Mask(APInt::getZero(BitWidth)), MatchAndChain(MatchAnds),
-        FoundAnd1(false) {}
+      : Mask(APInt::getZero(BitWidth)), MatchAndChain(MatchAnds) {}
 };
 
 /// This is a recursive helper for foldAnyOrAllBitsSet() that walks through a


        


More information about the llvm-commits mailing list