[llvm-commits] Refactoring of the dominator tree implementation for Clang
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Nov 30 19:13:55 PST 2011
On Nov 30, 2011, at 3:04 PM, Guoping Long wrote:
> Hi, LLVM
>
> 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:
> (1) Change the recalculate() template function to only rely on GraphTraits.
> (2) Add a size() method to GraphTraits template class to query the number of nodes in the graph.
>
> Attached is the patch. I also include the clang side patch for reference. Please let me know your comments. Thanks!
The LLVM part looks fine to me, except for this:
+ typedef GraphTraits<FT*> GraphType;
The graph type is FT, so if you must use a typedef for the traits, please call it something else, like Traits.
/jakob
More information about the llvm-commits
mailing list