[Transforms] Use default member initialization in Prefetch (NFC)
authorKazu Hirata <kazu@google.com>
Sun, 13 Feb 2022 18:34:02 +0000 (10:34 -0800)
committerKazu Hirata <kazu@google.com>
Sun, 13 Feb 2022 18:34:02 +0000 (10:34 -0800)
llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp

index 57e36e5..b29e3ad 100644 (file)
@@ -236,15 +236,14 @@ struct Prefetch {
   /// The address formula for this prefetch as returned by ScalarEvolution.
   const SCEVAddRecExpr *LSCEVAddRec;
   /// The point of insertion for the prefetch instruction.
-  Instruction *InsertPt;
+  Instruction *InsertPt = nullptr;
   /// True if targeting a write memory access.
-  bool Writes;
+  bool Writes = false;
   /// The (first seen) prefetched instruction.
-  Instruction *MemI;
+  Instruction *MemI = nullptr;
 
   /// Constructor to create a new Prefetch for \p I.
-  Prefetch(const SCEVAddRecExpr *L, Instruction *I)
-      : LSCEVAddRec(L), InsertPt(nullptr), Writes(false), MemI(nullptr) {
+  Prefetch(const SCEVAddRecExpr *L, Instruction *I) : LSCEVAddRec(L) {
     addInstruction(I);
   };