Hi, Jakob<div><br></div><div>  Thanks for your comments. Attached is the revised patch.</div><div><br></div><div>--</div><div>Guoping<br><br><div class="gmail_quote">2011/11/30 Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk">stoklund@2pi.dk</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="HOEnZb"><div class="h5"><br>
On Nov 30, 2011, at 3:04 PM, Guoping Long wrote:<br>
<br>
> Hi, LLVM<br>
><br>
>   Recently I am refactoring the dominators tree implementation in LLVM for Clang. In order to deal with different GraphTraits implementation between LLVM and Clang,  I also made two changes to LLVM dominators tree implementation:<br>

> (1) Change the recalculate() template function to only rely on GraphTraits.<br>
> (2) Add a size() method to GraphTraits template class to query the number of nodes in the graph.<br>
><br>
>  Attached is the patch. I also include the clang side patch for reference. Please let me know your comments. Thanks!<br>
<br>
</div></div>The LLVM part looks fine to me, except for this:<br>
<br>
+    typedef GraphTraits<FT*> GraphType;<br>
<br>
The graph type is FT, so if you must use a typedef for the traits, please call it something else, like Traits.<br>
<span class="HOEnZb"><font color="#888888"><br>
/jakob<br>
<br>
</font></span></blockquote></div><br></div>