[llvm] r233930 - [LoopAccesses] Handle case when no memchecks are needed after partitioning
Adam Nemet
anemet at apple.com
Thu Apr 2 10:51:57 PDT 2015
Author: anemet
Date: Thu Apr 2 12:51:57 2015
New Revision: 233930
URL: http://llvm.org/viewvc/llvm-project?rev=233930&view=rev
Log:
[LoopAccesses] Handle case when no memchecks are needed after partitioning
Modified:
llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=233930&r1=233929&r2=233930&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Thu Apr 2 12:51:57 2015
@@ -1211,9 +1211,8 @@ static Instruction *getFirstInst(Instruc
std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeCheck(
Instruction *Loc, const SmallVectorImpl<int> *PtrPartition) const {
- Instruction *tnullptr = nullptr;
if (!PtrRtCheck.Need)
- return std::pair<Instruction *, Instruction *>(tnullptr, tnullptr);
+ return std::make_pair(nullptr, nullptr);
unsigned NumPointers = PtrRtCheck.Pointers.size();
SmallVector<TrackingVH<Value> , 2> Starts;
@@ -1284,6 +1283,9 @@ std::pair<Instruction *, Instruction *>
}
}
+ if (!MemoryRuntimeCheck)
+ return std::make_pair(nullptr, nullptr);
+
// We have to do this trickery because the IRBuilder might fold the check to a
// constant expression in which case there is no Instruction anchored in a
// the block.
More information about the llvm-commits
mailing list