[clang] [lld] [llvm] [ThinLTO] Reduce the number of renaming due to promotions (PR #178587)

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 13:47:33 PST 2026


================
@@ -309,7 +319,12 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
   if (GV.hasLocalLinkage() && shouldPromoteLocalToGlobal(&GV, VI)) {
     // Save the original name string before we rename GV below.
     auto Name = GV.getName().str();
-    GV.setName(getPromotedName(&GV));
+    GlobalValueSummary *Summary = nullptr;
+    if (VI)
+      Summary = findSummaryInModule(ImportIndex, &GV, VI);
----------------
yonghong-song wrote:

Sorry, I made mistake. I will replace VI argument with 'Summary' in ShouldPromoteLocalToGlobal(), as you suggested.

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


More information about the llvm-commits mailing list