[PATCH] D69561: [ThinLTO] Import readonly vars with refs

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 08:47:06 PST 2019


tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

LGTM with some minor comment changes suggested. Thanks!



================
Comment at: llvm/lib/IR/ModuleSummaryIndex.cpp:176
         // an alias.
-        if (!canImportGlobalVar(S.get()) ||
+        if (!canImportGlobalVar(S.get(), false) ||
             GUIDPreservedSymbols.count(P.first)) {
----------------
document constant param


================
Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:314
       if (isa<GlobalVarSummary>(RefSummary.get()) &&
-          canImportGlobalVar(RefSummary.get()) &&
+          Index.canImportGlobalVar(RefSummary.get(), true) &&
           !LocalNotInModule(RefSummary.get())) {
----------------
document const param


================
Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:864
   computeDeadSymbols(Index, GUIDPreservedSymbols, isPrevailing);
+  // This function can be run twice: once with empty list of preserved
+  // symbols and second time when some preserved symbols are given.
----------------
This comment is stale and can presumably be removed now, as the corresponding setWithAttributePropagation(false) has been removed, right?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69561/new/

https://reviews.llvm.org/D69561





More information about the llvm-commits mailing list