[PATCH] D36311: [ThinLTO] Add GraphTraits for FunctionSummaries
Easwaran Raman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 15:41:51 PST 2018
eraman added inline comments.
================
Comment at: include/llvm/IR/ModuleSummaryIndex.h:1037
+template <> struct GraphTraits<ValueInfo> {
+ typedef ValueInfo NodeRef;
+
----------------
>From the comments in GraphTraits, NodeRef is "Type of Node token in the graph, which should be cheap to copy." ValueInfo is cheap to copy now, but if something later gets added to it it might not be cheap to copy anymore. It is preferable to keep NodeRef as a reference (or pointer) to ValueInfo. Also, you could use using instead of typedef.
https://reviews.llvm.org/D36311
More information about the llvm-commits
mailing list