<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Ah right, never mind me then.  Let me look at the rest of the patch.<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 11, 2016, at 6:39 PM, Tim Shen <<a href="mailto:timshen@google.com" class="">timshen@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Dereferencing ChildIteratorType needs to return a NodeRef, not succ_iterator.<br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Aug 11, 2016, 18:06 Adam Nemet <<a href="mailto:anemet@apple.com" class="">anemet@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">anemet added inline comments.<br class="">
<br class="">
================<br class="">
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:262-265<br class="">
@@ +261,6 @@<br class="">
+<br class="">
+  static NodeRef getEntryNode(const Loop &G) { return {&G, G.getHeader()}; }<br class="">
+<br class="">
+  static ChildIteratorType child_begin(NodeRef Node) {<br class="">
+    return make_filter_range(make_range<WrappedSuccIterator>(<br class="">
+                                 {succ_begin(Node.second), Node.first},<br class="">
----------------<br class="">
I am not sure we're talking about the same thing.  I meant:<br class="">
<br class="">
  return make_filter_range(make_range<succ_iterator>(<br class="">
                                            succ_begin(Node.second),<br class="">
                                            succ_end(Node.second)),<br class="">
                                          LoopBodyFilter(Node.first))<br class="">
<br class="">
and then:<br class="">
<br class="">
  struct LoopBodyFilter {<br class="">
    LoopBodyFitler(Loop *L) : L(L) {}<br class="">
    bool operator()(BasicBlock *BB) const {<br class="">
      return BB != L->getHeader() && L->contains(BB);<br class="">
    }<br class="">
    Loop *L;<br class="">
  };<br class="">
<br class="">
?<br class="">
<br class="">
In other words, it does not seem any different to me whether you attach the loop to the succ_iterator or the filter object.<br class="">
<br class="">
<br class="">
<a href="https://reviews.llvm.org/D22952" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D22952</a><br class="">
<br class="">
<br class="">
<br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>