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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 12 09:17:21 PST 2026


================
@@ -306,10 +304,17 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
     }
   }
 
-  if (GV.hasLocalLinkage() && shouldPromoteLocalToGlobal(&GV, VI)) {
+  GlobalValueSummary *Summary = nullptr;
+  if (VI)
----------------
teresajohnson wrote:

Maybe also guard this with GV.hasLocalLinkage() to avoid the hash lookup when we won't need it below?

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


More information about the llvm-commits mailing list