[PATCH] D36311: [ThinLTO] Add GraphTraits for FunctionSummaries
Charles Saternos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 4 08:04:32 PDT 2017
ncharlie added a comment.
Since this patch depends on https://reviews.llvm.org/D36233, I'm diffing against it to show minimal changes.
================
Comment at: include/llvm/IR/ModuleSummaryIndex.h:372
+ // (since scc_iterator doesn't accept nullptrs)
+ auto F = llvm::make_unique<FunctionSummary>(
+ GVFlags(GlobalValue::LinkageTypes::AvailableExternallyLinkage, true,
----------------
There are some external functions (i.e. libc functions) that aren't included in the summary, so I create an empty functionsummary for them.
================
Comment at: include/llvm/IR/ModuleSummaryIndex.h:820
+ // Use the first callee as the entry node
+ static NodeRef getEntryNode(const FunctionSummary *F) {
+ if (F->call_summaries_begin() != F->call_summaries_end())
----------------
Should the first callee be the entry node or the caller function itself?
https://reviews.llvm.org/D36311
More information about the llvm-commits
mailing list