diff options
author | Adam Nemet <anemet@apple.com> | 2015-08-12 16:51:19 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2015-08-12 16:51:19 +0000 |
commit | dfaeb33ec7dcef6389fa70af5d68006585ac8c65 (patch) | |
tree | 0b00dca9d44f62af0c0f54018d8555ad67446c3a /llvm/lib | |
parent | eb2bd9a2699188bdc25f19631497bee77f0c5949 (diff) | |
download | bcm5719-llvm-dfaeb33ec7dcef6389fa70af5d68006585ac8c65.tar.gz bcm5719-llvm-dfaeb33ec7dcef6389fa70af5d68006585ac8c65.zip |
[LoopVer] Optionally allow using memchecks from LAA
r243382 changed the behavior to always require a set of memchecks to be
passed to LoopVer. This change restores the prior behavior as an
alternative to the new behavior. This allows the checks to be
implicitly taken from the LAA object.
Patch by Ashutosh Nema!
llvm-svn: 244763
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopVersioning.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp index 4d2b1ee101f..ad2de241b40 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; |