Skip to content

Commit fd3e804

Browse files
[Transforms] Use default member initialization in Prefetch (NFC)
1 parent 0b9a610 commit fd3e804

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,14 @@ struct Prefetch {
236236
/// The address formula for this prefetch as returned by ScalarEvolution.
237237
const SCEVAddRecExpr *LSCEVAddRec;
238238
/// The point of insertion for the prefetch instruction.
239-
Instruction *InsertPt;
239+
Instruction *InsertPt = nullptr;
240240
/// True if targeting a write memory access.
241-
bool Writes;
241+
bool Writes = false;
242242
/// The (first seen) prefetched instruction.
243-
Instruction *MemI;
243+
Instruction *MemI = nullptr;
244244

245245
/// Constructor to create a new Prefetch for \p I.
246-
Prefetch(const SCEVAddRecExpr *L, Instruction *I)
247-
: LSCEVAddRec(L), InsertPt(nullptr), Writes(false), MemI(nullptr) {
246+
Prefetch(const SCEVAddRecExpr *L, Instruction *I) : LSCEVAddRec(L) {
248247
addInstruction(I);
249248
};
250249

0 commit comments

Comments
 (0)