<div dir="ltr">Test case? Or is this just a perf improvement?</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 2, 2015 at 10:51 AM, Adam Nemet <span dir="ltr"><<a href="mailto:anemet@apple.com" target="_blank">anemet@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: anemet<br>
Date: Thu Apr 2 12:51:57 2015<br>
New Revision: 233930<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=233930&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=233930&view=rev</a><br>
Log:<br>
[LoopAccesses] Handle case when no memchecks are needed after partitioning<br>
<br>
Modified:<br>
llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp<br>
<br>
Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=233930&r1=233929&r2=233930&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=233930&r1=233929&r2=233930&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Thu Apr 2 12:51:57 2015<br>
@@ -1211,9 +1211,8 @@ static Instruction *getFirstInst(Instruc<br>
<br>
std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeCheck(<br>
Instruction *Loc, const SmallVectorImpl<int> *PtrPartition) const {<br>
- Instruction *tnullptr = nullptr;<br>
if (!PtrRtCheck.Need)<br>
- return std::pair<Instruction *, Instruction *>(tnullptr, tnullptr);<br>
+ return std::make_pair(nullptr, nullptr);<br>
<br>
unsigned NumPointers = PtrRtCheck.Pointers.size();<br>
SmallVector<TrackingVH<Value> , 2> Starts;<br>
@@ -1284,6 +1283,9 @@ std::pair<Instruction *, Instruction *><br>
}<br>
}<br>
<br>
+ if (!MemoryRuntimeCheck)<br>
+ return std::make_pair(nullptr, nullptr);<br>
+<br>
// We have to do this trickery because the IRBuilder might fold the check to a<br>
// constant expression in which case there is no Instruction anchored in a<br>
// the block.<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>