The benefit of turning the parameter of LoopInfo::analyze() to const& is that it now can accept a rvalue.
Details
Details
Diff Detail
Diff Detail
Event Timeline
include/llvm/CodeGen/MachineDominators.h | ||
---|---|---|
267 | 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? |
Comment Actions
Use class inheritance to avoid code duplication when specializing GraphTraits for T and const T.
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)?