From fd3e8044cd0594ca2903bb0f0264d27691885a93 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 13 Feb 2022 10:34:02 -0800 Subject: [PATCH] [Transforms] Use default member initialization in Prefetch (NFC) --- llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp b/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp index 57e36e5..b29e3ad 100644 --- a/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp @@ -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); }; -- 2.7.4