[llvm] [LTO] Use a helper function to add a definition (NFC) (PR #105721)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 12:31:03 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

I missed this one when I introduced helper functions in:

  commit 3082a381f57ef2885c270f41f2955e08c79634c5
  Author: Kazu Hirata <kazu@<!-- -->google.com>
  Date:   Thu Aug 22 12:06:47 2024 -0700


---
Full diff: https://github.com/llvm/llvm-project/pull/105721.diff


1 Files Affected:

- (modified) llvm/lib/Transforms/IPO/FunctionImport.cpp (+2-2) 


``````````diff
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index 354ad0fde092a7..55803670071d16 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -600,8 +600,8 @@ class WorkloadImportsManager : public ModuleImportsManager {
       LLVM_DEBUG(dbgs() << "[Workload][Including]" << VI.name() << " from "
                         << ExportingModule << " : "
                         << Function::getGUID(VI.name()) << "\n");
-      ImportList[ExportingModule][VI.getGUID()] =
-          GlobalValueSummary::Definition;
+      FunctionImporter::addDefinition(ImportList, ExportingModule,
+                                      VI.getGUID());
       GVI.onImportingSummary(*GVS);
       if (ExportLists)
         (*ExportLists)[ExportingModule].insert(VI);

``````````

</details>


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


More information about the llvm-commits mailing list