[PATCH] D11892: LoopVersioning: Use default LAA runtimeCheck, When input check not provided.
Ashutosh Nema via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 19:56:06 PDT 2015
ashutosh.nema marked an inline comment as done.
================
Comment at: lib/Transforms/Utils/LoopVersioning.cpp:34-40
@@ -33,1 +33,9 @@
+LoopVersioning::LoopVersioning(const LoopAccessInfo &LAI, Loop *L, LoopInfo *LI,
+ DominatorTree *DT)
+ : VersionedLoop(L), NonVersionedLoop(nullptr), LAI(LAI), LI(LI), DT(DT) {
+ assert(L->getExitBlock() && "No single exit block");
+ assert(L->getLoopPreheader() && "No preheader");
+ const auto &RtChecks = LAI.getRuntimePointerChecking()->getChecks();
+ std::copy(RtChecks.begin(), RtChecks.end(), std::back_inserter(Checks));
+}
----------------
anemet wrote:
> Can't we initialize Checks in the constructor initializer list, i.e. Checks(LAI.getRuntimePointerChecking()->getChecks())?
>
> Is the reason that getChecks return SmallVectorImpl rather than SmallVector<.., 4> ?
>
> If yes then I think we should probably change getChecks to return SmallVector rather than SmallVectorImpl.
>
> What do you think?
Yes, that's the reason that getChecks return SmallVectorImpl rather than SmallVector<.., 4> ?
Will modify getChecks to return SmallVector rather than SmallVectorImpl.
Thanks,
Ashutosh
Repository:
rL LLVM
http://reviews.llvm.org/D11892
More information about the llvm-commits
mailing list