[llvm] 3fce5bb - [Transforms] Use default member initialization in LoopVersioning (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 6 16:36:46 PST 2022
Author: Kazu Hirata
Date: 2022-02-06T16:36:25-08:00
New Revision: 3fce5bb7b076fb0e8f0106898a626c4e4963ad28
URL: https://github.com/llvm/llvm-project/commit/3fce5bb7b076fb0e8f0106898a626c4e4963ad28
DIFF: https://github.com/llvm/llvm-project/commit/3fce5bb7b076fb0e8f0106898a626c4e4963ad28.diff
LOG: [Transforms] Use default member initialization in LoopVersioning (NFC)
Added:
Modified:
llvm/include/llvm/Transforms/Utils/LoopVersioning.h
llvm/lib/Transforms/Utils/LoopVersioning.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/Utils/LoopVersioning.h b/llvm/include/llvm/Transforms/Utils/LoopVersioning.h
index 4a8831ed45b25..918e9f3302a59 100644
--- a/llvm/include/llvm/Transforms/Utils/LoopVersioning.h
+++ b/llvm/include/llvm/Transforms/Utils/LoopVersioning.h
@@ -113,7 +113,7 @@ class LoopVersioning {
Loop *VersionedLoop;
/// The fall-back loop. I.e. control flows here if pointers in the
/// loop may alias (memchecks failed).
- Loop *NonVersionedLoop;
+ Loop *NonVersionedLoop = nullptr;
/// This maps the instructions from VersionedLoop to their counterpart
/// in NonVersionedLoop.
diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp
index f0bf625fa18ed..049f49df9434c 100644
--- a/llvm/lib/Transforms/Utils/LoopVersioning.cpp
+++ b/llvm/lib/Transforms/Utils/LoopVersioning.cpp
@@ -41,8 +41,7 @@ LoopVersioning::LoopVersioning(const LoopAccessInfo &LAI,
ArrayRef<RuntimePointerCheck> Checks, Loop *L,
LoopInfo *LI, DominatorTree *DT,
ScalarEvolution *SE)
- : VersionedLoop(L), NonVersionedLoop(nullptr),
- AliasChecks(Checks.begin(), Checks.end()),
+ : VersionedLoop(L), AliasChecks(Checks.begin(), Checks.end()),
Preds(LAI.getPSE().getUnionPredicate()), LAI(LAI), LI(LI), DT(DT),
SE(SE) {
}
More information about the llvm-commits
mailing list