<div dir="ltr">This actually looks really good at a first glance.  I know a few other places we would want to use this, and use custom non-recursive dfs implementations instead<div><br></div><div>Staring at it, i'm not actually sure i'd change anything, but i'll give folks longer than 6 minutes to comment on it :-)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 3, 2016 at 9:05 AM, David Callahan <span dir="ltr"><<a href="mailto:dcallahan@fb.com" target="_blank">dcallahan@fb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">david2050 created this revision.<br>
david2050 added reviewers: dberlin, mehdi_amini, nadav.<br>
david2050 added subscribers: llvm-commits, freik, twoh.<br>
Herald added subscribers: mzolotukhin, MatzeB.<br>
<br>
This makes a change to the state used to maintain visited information for depth first iterator. We know assume a method "completed(...)" which is called after all children of a node have been visited. In all existing cases, this method does nothing so this patch has no functional changes.  It will however allow a client to distinguish back from cross edges in a DFS tree.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D25191" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D25191</a><br>
<br>
Files:<br>
  include/llvm/ADT/<wbr>DepthFirstIterator.h<br>
  include/llvm/Analysis/<wbr>LoopInfoImpl.h<br>
  include/llvm/Analysis/<wbr>RegionInfo.h<br>
  include/llvm/Analysis/<wbr>RegionIterator.h<br>
  include/llvm/CodeGen/<wbr>MachineRegionInfo.h<br>
  include/llvm/IR/Dominators.h<br>
  lib/CodeGen/<wbr>LiveIntervalAnalysis.cpp<br>
  lib/CodeGen/LiveVariables.cpp<br>
  lib/CodeGen/MachineVerifier.<wbr>cpp<br>
  lib/CodeGen/<wbr>PrologEpilogInserter.cpp<br>
  lib/CodeGen/<wbr>UnreachableBlockElim.cpp<br>
  lib/Target/X86/<wbr>X86FloatingPoint.cpp<br>
  lib/Transforms/IPO/<wbr>ArgumentPromotion.cpp<br>
  unittests/ADT/<wbr>DepthFirstIteratorTest.cpp<br>
<br>
</blockquote></div><br></div>