[llvm-commits] Refactoring of the dominator tree implementation for Clang

Guoping Long longguoping at gmail.com
Wed Nov 30 19:56:56 PST 2011


Hi, Jakob

  Thanks for your comments. Attached is the revised patch.

--
Guoping

2011/11/30 Jakob Stoklund Olesen <stoklund at 2pi.dk>

>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111130/f9209bf4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dominators-llvm.patch
Type: application/octet-stream
Size: 4765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111130/f9209bf4/attachment.obj>


More information about the llvm-commits mailing list