[PATCH] D11250: Rename LoopInfo::Analyze() to LoopInfo::analyze() and turn its parameter type to const&.

Cong Hou congh at google.com
Mon Jul 27 10:58:16 PDT 2015


congh added inline comments.

================
Comment at: include/llvm/CodeGen/MachineDominators.h:267
@@ +266,3 @@
+template <> struct GraphTraits<const MachineDomTreeNode *> {
+  typedef const MachineDomTreeNode NodeType;
+  typedef NodeType::const_iterator ChildIteratorType;
----------------
hfinkel wrote:
> The fact that this requires copy-and-paste from above is somewhat sad, could we do better (have them both inherit from a templated base class perhaps)?
> 
Thanks you for your suggestion! I tried creating a base class and it works well. However, we have many places with two template struct defined for T and const T in copy-and-paste style. Do you think if it is a good idea to do this for all of them? 


http://reviews.llvm.org/D11250







More information about the llvm-commits mailing list