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

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 08:14:33 PST 2017


dberlin created this revision.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: nhaehnle, arsenm.

Convert all obvious node_begin/node_end and child_begin/child_end
pairs to range based for.

Sending for review in case someone has a good idea how to make
graph_children able to be inferred. It looks like it would require
changing GraphTraits to be two argument or something. I presume
inference does not happen because it would have to check every
GraphTraits in the world to see if the noderef types matched.

Note: This change was 3-staged with clang as well, which uses
Dominators/etc from LLVM.


https://reviews.llvm.org/D29767

Files:
  include/llvm/ADT/GraphTraits.h
  include/llvm/Support/GenericDomTree.h
  include/llvm/Support/GenericDomTreeConstruction.h
  lib/Analysis/IteratedDominanceFrontier.cpp
  lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
  lib/Target/Hexagon/HexagonBitSimplify.cpp
  lib/Target/Hexagon/HexagonCommonGEP.cpp
  lib/Target/Hexagon/HexagonGenExtract.cpp
  lib/Target/Hexagon/HexagonGenInsert.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29767.87813.patch
Type: text/x-patch
Size: 10433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/37785676/attachment.bin>


More information about the llvm-commits mailing list