Generally LGTM. It might be worth while to beef up the comments on these methods of po_iterator_storage to make it more clear how this can be used to hijack and extend the post order iteration.<div class="gmail_extra"><br>
<br><div class="gmail_quote">On Mon, Jul 16, 2012 at 8:05 PM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk" target="_blank">stoklund@2pi.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
All,<br>
<br>
Please review the attached patch which generalizes the po_iterator class template such that it is possible to prune graph edges from the DFS traversal.<br>
<br>
It is already possible to limit the traversal to a subset of graph nodes by providing a custom SetType class, see for example the LoopBlocksTraversal class which limits a post-order traversal to blocks inside a loop. It is currently not possible to remove edges from the graph, though. For example, it would be useful to run a post-order traversal over loop blocks while omitting the back edges.<br>

<br>
This patch makes it possible to prune graph edges by specializing the po_iterator_storage base class and implementing the insertEdge() function. The patch also pulls the existing DFSetTraits trick into the po_iterator_storage base class.<br>

<span class="HOEnZb"><font color="#888888"><br>
/jakob<br>
<br>
</font></span><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>