[llvm] [ThinLTO] Reduce the number of renaming due to promotions in distribu… (PR #188074)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 12:17:44 PDT 2026


================
@@ -1607,6 +1607,23 @@ void llvm::gatherImportedSummariesForModule(
 
     SummariesForIndex[GUID] = DS->second;
   }
+
+  // For each source module we import from, also include summaries for local
----------------
teresajohnson wrote:

This will cause us to import all of these as definitions, which is probably less than ideal as we decided earlier not to import them. Better to import as a declaration in this case. See DecSummaries populated just above here.

Also, if we don't already, it would be good to have an assert somewhere that if noRenameOnPromotion is set we are definitely promoting, because once we start importing the def or decl it absolutely has to be promoted to external linkage. Maybe in FunctionImportUtils?

https://github.com/llvm/llvm-project/pull/188074


More information about the llvm-commits mailing list