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

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 18:39:01 PDT 2016


Dereferencing ChildIteratorType needs to return a NodeRef, not
succ_iterator.

On Thu, Aug 11, 2016, 18:06 Adam Nemet <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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160812/af57d0f0/attachment.html>


More information about the llvm-commits mailing list