LLVM Documentation: MergeFunctions pass

Sean Silva chisophugis at gmail.com
Mon Sep 15 15:02:51 PDT 2014


Wow, this is a really detailed document. Great work!

I wouldn't typically recommend a document to go into this much detail, but
I think that in this particular case, it is fine to have this detail since
the document can double as a "in-depth walkthrough of a specific LLVM
pass", which I'm sure will be useful for newbies to get a feel for things.

In your first section please answer the three questions here:
http://llvm.org/docs/SphinxQuickstartTemplate.html#guidelines

I don't know that much about the pass (especially the new implementation),
so Nick, could you skim over the content to make sure it is covering all
the main bases?

Some random comments:

> Sometimes code contains functions that does exactly the same thing even
though
> they are non-equal on the binary level.

This confuses me; do you mean non-equal on the source level, but equal on
the binary level?

> If we will track every numbers and flags to be compared we would be able
to get
> numbers chain and then create the hash number. So, once again,
*total-ordering*
> could be considered as a milestone for even faster (in theory)
random-access
> approach.

I'm not sure this makes sense. I imagine that part of the benefit of the
comparison-based approach is that the comparisons can return early once
they find a difference. Hashing always has to look at everything. Does the
current comparison routine look at the entire function before actually
doing any comparisons?

> #. For two trees *T1* and *T2* we perform *depth-first-trace* and have two
>    chains as a product: "*T1Items*" and "*T2Items*".

I think most readers would be more comfortable with the terms
"depth-first-traversal" instead of "depth-first-trace" and "sequences"
instead of "chains".

> Consider modification of *cmpType* method.

What does this paragraph mean?

-- Sean Silva



On Sun, Sep 14, 2014 at 11:02 PM, <llvm at dyatkovskiy.com> wrote:

> ping
>
> 11.09.2014, 12:50, "Stepan Dyatkovskiy" <stpworld at narod.ru>:
> > Reattached as patch.
> >
> > Stepan Dyatkovskiy wrote:
> >>  Hello everyone,
> >>  Please review the MergeFunctions pass documentation in attachment. Hope
> >>  doc is clear enough :-)
> >>
> >>  - Stepan
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140915/eb0a2c47/attachment.html>


More information about the llvm-commits mailing list