aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopVersioning.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopVersioning.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp
index 4d2b1ee..ad2de24 100644
--- a/llvm/lib/Transforms/Utils/LoopVersioning.cpp
+++ b/llvm/lib/Transforms/Utils/LoopVersioning.cpp
@@ -31,6 +31,15 @@ LoopVersioning::LoopVersioning(
assert(L->getLoopPreheader() && "No preheader");
}
+LoopVersioning::LoopVersioning(const LoopAccessInfo &LAInfo, Loop *L,
+ LoopInfo *LI, DominatorTree *DT)
+ : VersionedLoop(L), NonVersionedLoop(nullptr),
+ Checks(LAInfo.getRuntimePointerChecking()->getChecks()), LAI(LAInfo),
+ LI(LI), DT(DT) {
+ assert(L->getExitBlock() && "No single exit block");
+ assert(L->getLoopPreheader() && "No preheader");
+}
+
void LoopVersioning::versionLoop(Pass *P) {
Instruction *FirstCheckInst;
Instruction *MemRuntimeCheck;