[PATCH] D50120: [ADT] Add some documentation for GraphTraits.

Tim Shen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 1 17:21:42 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL338660: [ADT] Add some documentation for GraphTraits. (authored by timshen, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D50120?vs=158589&id=158670#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D50120

Files:
  llvm/trunk/include/llvm/ADT/GraphTraits.h


Index: llvm/trunk/include/llvm/ADT/GraphTraits.h
===================================================================
--- llvm/trunk/include/llvm/ADT/GraphTraits.h
+++ llvm/trunk/include/llvm/ADT/GraphTraits.h
@@ -25,6 +25,13 @@
 // GraphTraits - This class should be specialized by different graph types...
 // which is why the default version is empty.
 //
+// This template evolved from supporting `BasicBlock` to also later supporting
+// more complex types (e.g. CFG and DomTree).
+//
+// GraphTraits can be used to create a view over a graph interpreting it
+// differently without requiring a copy of the original graph. This could
+// be achieved by carrying more data in NodeRef. See LoopBodyTraits for one
+// example.
 template<class GraphType>
 struct GraphTraits {
   // Elements to provide:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50120.158670.patch
Type: text/x-patch
Size: 804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180802/bbd0888a/attachment.bin>


More information about the llvm-commits mailing list