[llvm-dev] RFC: Representing unions in TBAA

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Sun May 14 19:00:41 PDT 2017


>
>
> I don't agree, but this is because I fail to see how the two
> representations (the GCC-like one you've outlined and the current one with
> the proposed extension) aren't completely isomorphic. Your proposal is:
>
>
Lots of data structures are completely isomorphic in the same way,  and in
plenty of those cases, one is completely unusable, and the other functions
quite well.

Your below is basically "one is drawn in one direction, and the other is
drawn the other".
This is entirely true.

You want to argue that this means they will be exactly as efficient or easy
to understand as each other.
This is where you and I disagree.
I disagree because i rarely see parent-linked graph structures (outside of
union-find ) that are implemented or used well.
People often screw up the algorithms, they tend to be harder to reason
about, etc.
This is why, for example, despite having both parent and child links,
roughly all of our dominator tree graph algorithms walk children instead of
parents, even though you could equivalently do them using only the parent
links (even the depth first algorithms).

Past that I'm not sure what you want me to say here.
If y'all come up with an implementation that works as well as the ones i'm
familiar with, i'll be as happy as anyone else?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170514/4083c368/attachment.html>


More information about the llvm-dev mailing list