[llvm] r233930 - [LoopAccesses] Handle case when no memchecks are needed after partitioning

David Blaikie dblaikie at gmail.com
Thu Apr 2 11:05:18 PDT 2015


Test case? Or is this just a perf improvement?

On Thu, Apr 2, 2015 at 10:51 AM, Adam Nemet <anemet at apple.com> wrote:

> 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.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150402/678d95e4/attachment.html>


More information about the llvm-commits mailing list