[llvm-commits] [PATCH] Preparation for Optimal Edge Profiling: Add calculation of maximum spanning tree.

Andreas Neustifter e0325716 at student.tuwien.ac.at
Mon Aug 24 15:12:31 PDT 2009

Hash: SHA1

Hi Daniel!

Daniel Dunbar wrote:
> On Wed, Aug 19, 2009 at 9:09 AM, Andreas
> Neustifter<e0325716 at student.tuwien.ac.at> wrote:
>> this is a preparation patch for Optimal Edge Profiling, it adds a module to
>> calculate the maximum spanning tree of an function according to an given
>> ProfileInformation.
> This class is specialized to ProfileInfo, so I don't think it should
> go into the generic headers. Can it just live where the optimal edge
> profiling implementation does, as private helper class?

Yes, of course. As long as I'm not able to make this an generic class,
but see below...

> Also, MSTForest is just union find, right? Can it use
> llvm/ADT/EquivalenceClasses.h instead?

Yep, guess I can. Have to try it first, tough.

> Similarly, MaximumSpanningTree should say 'Kruskal's algorithm'
> somewhere. Also, would it make more sense to just implement MST, and
> have clients use set_difference if they want the complement, instead
> of the inverted flag? I would find this easier to read (I think).

Will try that too.

> It isn't necessary, but I think this code might be simpler and easier
> to read if it was just a generic implementation of Kruskal's
> algorithm, which the Optimal Edge Profiling could manage its own
> instantiation of. Then it would make sense to drop it in ADT/

I am not sure if I manage to work this out but I will try.

Thanks for the advice!


- --
This email is signed, for more information see
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the llvm-commits mailing list