[PATCH] D22952: [LoopVectorize] Detect loops in the innermost loop before creating InnerLoopVectorizer

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 20:28:10 PDT 2016


Ah right, never mind me then.  Let me look at the rest of the patch.

> On Aug 11, 2016, at 6:39 PM, Tim Shen <timshen at google.com> wrote:
> 
> Dereferencing ChildIteratorType needs to return a NodeRef, not succ_iterator.
> 
> On Thu, Aug 11, 2016, 18:06 Adam Nemet <anemet at apple.com <mailto:anemet at apple.com>> wrote:
> anemet added inline comments.
> 
> ================
> Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:262-265
> @@ +261,6 @@
> +
> +  static NodeRef getEntryNode(const Loop &G) { return {&G, G.getHeader()}; }
> +
> +  static ChildIteratorType child_begin(NodeRef Node) {
> +    return make_filter_range(make_range<WrappedSuccIterator>(
> +                                 {succ_begin(Node.second), Node.first},
> ----------------
> I am not sure we're talking about the same thing.  I meant:
> 
>   return make_filter_range(make_range<succ_iterator>(
>                                             succ_begin(Node.second),
>                                             succ_end(Node.second)),
>                                           LoopBodyFilter(Node.first))
> 
> and then:
> 
>   struct LoopBodyFilter {
>     LoopBodyFitler(Loop *L) : L(L) {}
>     bool operator()(BasicBlock *BB) const {
>       return BB != L->getHeader() && L->contains(BB);
>     }
>     Loop *L;
>   };
> 
> ?
> 
> In other words, it does not seem any different to me whether you attach the loop to the succ_iterator or the filter object.
> 
> 
> https://reviews.llvm.org/D22952 <https://reviews.llvm.org/D22952>
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160811/bda52a02/attachment.html>


More information about the llvm-commits mailing list