[llvm] r204184 - [LV] Replace some dead code with an assert. When I first ported this

Chandler Carruth chandlerc at gmail.com
Tue Mar 18 15:05:24 PDT 2014


This was not what I meant to commit. Sorry. See r204187.


On Tue, Mar 18, 2014 at 2:51 PM, Chandler Carruth <chandlerc at gmail.com>wrote:

> Author: chandlerc
> Date: Tue Mar 18 16:51:46 2014
> New Revision: 204184
>
> URL: http://llvm.org/viewvc/llvm-project?rev=204184&view=rev
> Log:
> [LV] Replace some dead code with an assert. When I first ported this
> pass from a loop pass to a function pass I did so in the naive,
> recursive way. It doesn't actually work, we need a worklist instead.
> When I switched to the worklist I didn't delete the naive recursion.
> That recursion was also buggy because it was dead and never really
> exercised.
>
> Modified:
>     llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
>
> Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=204184&r1=204183&r2=204184&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
> +++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Tue Mar 18
> 16:51:46 2014
> @@ -1067,8 +1067,8 @@ struct LoopVectorize : public FunctionPa
>      // We only handle inner loops, so if there are children just recurse.
>      if (!L->empty()) {
>        bool Changed = false;
> -      for (Loop::iterator I = L->begin(), E = L->begin(); I != E; ++I)
> -        Changed |= processLoop(*I);
> +      for (Loop *InnerL : *L)
> +        Changed |= processLoop(InnerL);
>        return Changed;
>      }
>
>
>
> _______________________________________________
> 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/20140318/c31b05fc/attachment.html>


More information about the llvm-commits mailing list