Skip to content

Conversation

@vitalybuka
Copy link
Collaborator

Preparation for CFI Index refactoring,
which will fix O(N^2) in ThinLTO indexing.

Created using spr 1.3.4
@llvmbot
Copy link
Member

llvmbot commented Mar 7, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Vitaly Buka (vitalybuka)

Changes

Preparation for CFI Index refactoring,
which will fix O(N^2) in ThinLTO indexing.


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

1 Files Affected:

  • (modified) llvm/lib/Transforms/IPO/LowerTypeTests.cpp (+2-2)
diff --git a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
index 3a3c8ef654dcc..7fe0de19f0256 100644
--- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
@@ -1699,9 +1699,9 @@ void LowerTypeTestsModule::buildBitSetsFromFunctionsNative(
 
       if (IsExported) {
         if (IsJumpTableCanonical)
-          ExportSummary->cfiFunctionDefs().insert(std::string(F->getName()));
+          ExportSummary->cfiFunctionDefs().emplace(F->getName());
         else
-          ExportSummary->cfiFunctionDecls().insert(std::string(F->getName()));
+          ExportSummary->cfiFunctionDecls().emplace(F->getName());
       }
 
       if (!IsJumpTableCanonical) {

@vitalybuka vitalybuka changed the title [NFC][ThinLTO] Remove redundant .empty() check [NFC][ThinLTO] Avoid temporarily std::string Mar 7, 2025
@vitalybuka vitalybuka requested a review from fmayer March 7, 2025 21:50
@fmayer
Copy link
Contributor

fmayer commented Mar 7, 2025

nit: [NFC][ThinLTO] Avoid temporary std::string

@vitalybuka vitalybuka changed the title [NFC][ThinLTO] Avoid temporarily std::string [NFC][ThinLTO] Avoid temporary std::string Mar 7, 2025
@vitalybuka vitalybuka merged commit d8e8892 into main Mar 7, 2025
10 of 13 checks passed
@vitalybuka vitalybuka deleted the users/vitalybuka/spr/nfcthinlto-remove-redundant-empty-check branch March 7, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants