[PATCH] D36047: [ThinLTO] Add function attributes to Index and GraphTraits for function summary

Charles Saternos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 29 08:32:41 PDT 2017

ncharlie added inline comments.

Comment at: include/llvm/IR/ModuleSummaryIndex.h:381
+      // External function
+      // FIXME: constructing a new functionsumary just for external functions is
+      // probably wrong
I don't think creating an empty FunctionSummary is correct, however I have it here right now because there has to be some way of handling external functions that aren't in the index (i.e. library functions like printf, etc).

Comment at: include/llvm/IR/ModuleSummaryIndex.h:844
+    // use a dummy functionsummary
+    auto S = llvm::make_unique<FunctionSummary>(
+        FunctionSummary::GVFlags(
I'm not sure that this is the proper way to handle a function that have any calls. Should this function just be `return F;`?


More information about the llvm-commits mailing list