summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2015-04-02 17:51:57 +0000
committerAdam Nemet <anemet@apple.com>2015-04-02 17:51:57 +0000
commit90fec840ebd7210aeb011e411e663359d7a8b45f (patch)
tree5dbae8846d2a474e61cc87b362336a4e2f25829d /llvm/lib
parentf1a6414b49778a108751be15779d6639bf1e5486 (diff)
downloadbcm5719-llvm-90fec840ebd7210aeb011e411e663359d7a8b45f.tar.gz
bcm5719-llvm-90fec840ebd7210aeb011e411e663359d7a8b45f.zip
[LoopAccesses] Handle case when no memchecks are needed after partitioning
llvm-svn: 233930
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/LoopAccessAnalysis.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 1818e93eb0e..159efff1a70 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1211,9 +1211,8 @@ static Instruction *getFirstInst(Instruction *FirstInst, Value *V,
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 *> LoopAccessInfo::addRuntimeCheck(
}
}
+ 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.
OpenPOWER on IntegriCloud