[PATCH] D29767: GraphTraits: Add range versions of graph traits functions (graph_nodes, graph_children, inverse_graph_nodes, inverse_graph_children).

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 10:23:28 PST 2017


(if you feel like waiting for other opinions/perspectives, that's OK - they
might have some other ideas, etc)

On Thu, Feb 9, 2017 at 10:22 AM David Blaikie via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:

> dblaikie accepted this revision.
> dblaikie added a comment.
> This revision is now accepted and ready to land.
>
> Looks good - sounds like you answered your own main question: no way to
> find the graph from the node type, so the children ops do need an explicit
> template param.
>
> & I'd probably drop the "graph_" prefix - up to you though if you think
> that's better or worse, etc.
>
>
>
> ================
> Comment at: lib/Target/Hexagon/HexagonBitSimplify.cpp:264
> +  for (auto *DTN : graph_children<MachineDomTreeNode*>(MDT->getNode(&B)))
> +    Changed |= visitBlock(*(DTN->getBlock()), T, NewAVs);
> +
> ----------------
> I probably wouldn't bother with the extra parens there:
>
>   *DTN->getBlock()
>
> rather than:
>
>   *(DTN->getBlock())
>
>
> https://reviews.llvm.org/D29767
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/4d89c0b0/attachment.html>


More information about the llvm-commits mailing list