[llvm] fd3e804 - [Transforms] Use default member initialization in Prefetch (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 13 10:34:28 PST 2022
Author: Kazu Hirata
Date: 2022-02-13T10:34:02-08:00
New Revision: fd3e8044cd0594ca2903bb0f0264d27691885a93
URL: https://github.com/llvm/llvm-project/commit/fd3e8044cd0594ca2903bb0f0264d27691885a93
DIFF: https://github.com/llvm/llvm-project/commit/fd3e8044cd0594ca2903bb0f0264d27691885a93.diff
LOG: [Transforms] Use default member initialization in Prefetch (NFC)
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp b/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp
index 57e36e5b9b90..b29e3ad87cc2 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);
};
More information about the llvm-commits
mailing list