[PATCH] D42311: [SyntheticCounts] Rewrite the code using only graph traits.

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 13:25:09 PST 2018


On Fri, Jan 19, 2018 at 12:55 PM, Daniel Berlin via Phabricator <
reviews at reviews.llvm.org> wrote:

> dberlin added a comment.
>
> I like the idea here a lot, but i don't understand why you need to make a
> new type of graph traits with things called call_edge_begin/end.
> Can you explain the necessity here?
> (IE why can you just not implement a graphtraits, why do you need a
> callgraphtraits)
>
call_edge_begin/end can be moved to GraphTraits (and renamed as
edge_begin/end) as it makes sense for any graph and not just a call graph.
But has_function_def(Noderef) is a call graph specific trait. I could
eliminate this and have a callback for this but I felt this looks cleaner.


>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D42311
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180119/3b536249/attachment.html>


More information about the llvm-commits mailing list